Skip to content

Instantly share code, notes, and snippets.

Created August 7, 2017 08:18
Show Gist options
  • Save anonymous/0bd28c5a53a61d8850433f62f6cf85de to your computer and use it in GitHub Desktop.
Save anonymous/0bd28c5a53a61d8850433f62f6cf85de to your computer and use it in GitHub Desktop.
# 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