mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 10:04:18 -08:00
22 lines
641 B
Docker
22 lines
641 B
Docker
FROM node:14
|
|
|
|
# Set working directory like 'cd' command, any subsequent instructions in this docker file, will start from
|
|
# this working directory
|
|
WORKDIR /client
|
|
|
|
# Copy the package.json and package_lock.json files from local to the docker image / container
|
|
COPY package*.json ./
|
|
|
|
# install all packages as a layer in the docker image / container
|
|
RUN npm install
|
|
|
|
# copy all local files from the working directory to the docker image/container however we must use
|
|
# dockerignore to ignore node_modules so that the image can use what what was just installed from the above
|
|
# step.
|
|
COPY . .
|
|
|
|
ENV PORT=6000
|
|
|
|
EXPOSE 6000
|
|
|
|
CMD [ "npm", "start"]
|