Created
January 28, 2020 06:12
-
-
Save anibal21/95fec5eebc72353dafbbc53b3bcd618d to your computer and use it in GitHub Desktop.
Dockerfile for SPA Builds
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 nginx:alpine | |
RUN apk add --update npm | |
COPY nginx.conf /etc/nginx/conf.d/default.conf | |
COPY . /usr/local/app/ | |
WORKDIR /usr/local/app/ | |
RUN npm install | |
RUN npm update | |
RUN npm run build | |
RUN cp -R dist/* /usr/share/nginx/html | |
STOPSIGNAL SIGTERM | |
CMD ["nginx", "-g", "daemon off;"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment