diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-08-22 13:43:33 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-08-22 13:43:33 +0300 |
commit | 6bd9a01ae4c3232386cc56cdf3607d8d58ec5120 (patch) | |
tree | f2e8d084b34671961bef25ebb69a61f2281f64b8 /Dockerfile.master | |
parent | 2f15513e46c57fbf02e93dbaa8b4ff9c79d46620 (diff) |
Port CE symlink to Dockerfiles
This ports all the work of
https://gitlab.com/gitlab-org/gitlab-docs/merge_requests/520
to the Dockerfiles, so that this can be applied to all versions.
Diffstat (limited to 'Dockerfile.master')
-rw-r--r-- | Dockerfile.master | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Dockerfile.master b/Dockerfile.master index e306dfe6..5f3b420a 100644 --- a/Dockerfile.master +++ b/Dockerfile.master @@ -1,3 +1,8 @@ +# +# This Dockerfile is mainly used to create the docs:latest image which includes +# the latest 3 stable versions plus the most recent one built from master. +# + # First use the bootstrap image to build master FROM registry.gitlab.com/gitlab-org/gitlab-docs:bootstrap as builder @@ -13,6 +18,13 @@ COPY . /source/ RUN bundle exec rake setup_git default RUN bundle exec nanoc compile -VV +# Symlink all README.html to index.html +RUN for i in `find /source/public/ -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done + +# Remove CE dir and symlink EE to CE +# https://gitlab.com/gitlab-org/gitlab-docs/issues/418 +RUN if [ -d "/source/public/ce/" ]; then cd /source/public/ce && rm -r ce && ln -s ee ce; fi + # Remove tmp dir to save some space RUN rm -rf /source/tmp @@ -27,6 +39,7 @@ ENV TARGET=/usr/share/nginx/html # This hardly ever changes so should usually be cached COPY --from=registry.gitlab.com/gitlab-org/gitlab-docs:nginx-onbuild /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf +# Remove default Nginx HTML files RUN rm -rf /usr/share/nginx/html/* # Get all the archive static HTML and put it into place |