Skip to content

Instantly share code, notes, and snippets.

@rasmar
Last active March 9, 2018 12:15
Show Gist options
  • Save rasmar/4e0c054463c603b30b328c984698c801 to your computer and use it in GitHub Desktop.
Save rasmar/4e0c054463c603b30b328c984698c801 to your computer and use it in GitHub Desktop.
E2E - final Dockerfile
## Real app image
FROM nginx:alpine # Remove 'as app'
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 3000
## specify node version
FROM quay.io/netguru/ng-node:6 # Remove 'as builder'
## add necessary environments
ENV NODE_ENV e2e # Set env
ENV REACT_APP_API_BASE_URL http://backend:5001 # Set env var to point to backend within build. It can be also done by specific command in package.json
## add code & build app
ADD . $APP_HOME
RUN yarn install # Install dependencies
RUN yarn build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment