Skip to content

Instantly share code, notes, and snippets.

@danieldiazastudillo
Created August 7, 2018 14:14
Show Gist options
  • Save danieldiazastudillo/5a64c0b976405901f6682d0db793abeb to your computer and use it in GitHub Desktop.
Save danieldiazastudillo/5a64c0b976405901f6682d0db793abeb to your computer and use it in GitHub Desktop.
Dockerfile for Angular 6 apps (no-auto-build)
## Base image
FROM nginx:1.13.3-alpine
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
## overrides nginx defaults
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
## From 'builder' stage copy over the artifacts in dist folder to default nginx public folder
COPY /dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
#nginx-custom-conf
#server {
# listen 80;
# location / {
# root /usr/share/nginx/html;
# index index.html index.htm;
# try_files $uri $uri/ /index.html =404;
# }
#}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment