2021-09-07 10:35:11 -07:00
|
|
|
FROM node:14
|
|
|
|
|
2025-01-23 09:24:02 -05:00
|
|
|
ENV PORT=6000
|
|
|
|
|
2021-09-07 10:35:11 -07:00
|
|
|
# Set working directory like 'cd' command, any subsequent instructions in this docker file, will start from
|
|
|
|
# this working directory
|
|
|
|
WORKDIR /client
|
|
|
|
|
2025-01-23 09:24:02 -05:00
|
|
|
# install all packages as a layer in the docker image / container
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm ci && npm cache clean --force
|
|
|
|
|
2021-09-07 10:35:11 -07:00
|
|
|
# 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 . .
|
|
|
|
|
|
|
|
EXPOSE 6000
|
|
|
|
|
2025-01-23 09:24:02 -05:00
|
|
|
CMD [ "npm", "start"]
|