diff --git a/Dockerfile b/Dockerfile index 7926f5da47..d3678aebc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,13 +39,10 @@ ARG DISTRIBUTION_BRANCH ENV DISTRIBUTION_BRANCH=${DISTRIBUTION_BRANCH} -# Reset to alpine so we don't get any docs source or extra apps +# Base stage to be used for deploying the docs FROM nginx:alpine AS deploybase ENV TARGET=/usr/share/nginx/html - -# Get the nginx config from the nginx-onbuild image -# This hardly ever changes so should usually be cached -COPY --from=docs/docker.github.io:nginx-onbuild /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf +COPY _deploy/nginx/default.conf /etc/nginx/conf.d/default.conf # Set the default command to serve the static HTML site CMD echo -e "Docker docs are viewable at:\nhttp://0.0.0.0:4000"; exec nginx -g 'daemon off;' diff --git a/_deploy/nginx/default.conf b/_deploy/nginx/default.conf new file mode 100644 index 0000000000..59b585cbc2 --- /dev/null +++ b/_deploy/nginx/default.conf @@ -0,0 +1,9 @@ +server { + port_in_redirect off; + listen 4000; + error_page 403 404 /404.html; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } +}