Skip to content

Instantly share code, notes, and snippets.

@anibal21
Created January 28, 2020 06:12
Show Gist options
  • Save anibal21/95fec5eebc72353dafbbc53b3bcd618d to your computer and use it in GitHub Desktop.
Save anibal21/95fec5eebc72353dafbbc53b3bcd618d to your computer and use it in GitHub Desktop.
Dockerfile for SPA Builds
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