Last active
February 27, 2022 18:01
-
-
Save ScriptBytes/61d4f6a9f9d68a49245705904519bf32 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:16.14.0 as build | |
WORKDIR /source | |
# Copy the package lock file into the container | |
COPY package*.json ./ | |
# Run ci only for the production dependencies | |
RUN npm ci | |
# Copy the rest of the files into the container and build | |
COPY . . | |
RUN npm run build --prod | |
FROM nginx:alpine | |
COPY --from=build /source/dist/todo /usr/share/nginx/html | |
COPY --from=build /source/nginx.conf /etc/nginx/conf.d/ | |
EXPOSE 8080 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment