-
-
Save yv84/a00104ea58ff0190b65a8452846e3876 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
# https://medium.com/@shakyShane/lets-talk-about-docker-artifacts-27454560384f | |
# Stage 1 - the build process | |
FROM node:7.10 as build-deps | |
WORKDIR /usr/src/app | |
COPY package.json yarn.lock ./ | |
RUN yarn | |
COPY . ./ | |
RUN yarn build | |
# Stage 2 - the production environment | |
FROM nginx:1.12-alpine | |
COPY --from=build-deps /usr/src/app/build /usr/share/nginx/html | |
EXPOSE 80 | |
CMD ["nginx", "-g", "daemon off;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment