Last active
March 9, 2018 12:15
-
-
Save rasmar/4e0c054463c603b30b328c984698c801 to your computer and use it in GitHub Desktop.
E2E - final Dockerfile
This file contains 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
## Real app image | |
FROM nginx:alpine # Remove 'as app' | |
COPY nginx.conf /etc/nginx/nginx.conf | |
EXPOSE 3000 |
This file contains 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
## 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