FROM nginx:alpine 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=registry.gitlab.com/gitlab-com/gitlab-docs:nginx-onbuild /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf # Get all the archive static HTML and put it into place # Go oldest-to-newest to take advantage of the fact that we change older # archives less often than new ones. COPY --from=registry.gitlab.com/gitlab-com/gitlab-docs:10.3 ${TARGET} ${TARGET} COPY --from=registry.gitlab.com/gitlab-com/gitlab-docs:10.4 ${TARGET} ${TARGET} COPY --from=registry.gitlab.com/gitlab-com/gitlab-docs:10.5 ${TARGET} ${TARGET} COPY --from=registry.gitlab.com/gitlab-com/gitlab-docs:10.6 ${TARGET} ${TARGET} COPY --from=registry.gitlab.com/gitlab-com/gitlab-docs:10.7 ${TARGET} ${TARGET} COPY --from=registry.gitlab.com/gitlab-com/gitlab-docs:10.8 ${TARGET} ${TARGET} # Serve the site (target), which is now all static HTML CMD echo -e "GitLab docs are viewable at:\nhttp://0.0.0.0:4000"; exec nginx -g 'daemon off;'