Dockerfile: output Jekyll profile information

Also skip updating sitemap.xml for the development environment.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-10-23 00:58:54 +02:00
parent ea7b89ea2b
commit 9b79a27ab4
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 5 additions and 5 deletions

View File

@ -57,14 +57,14 @@ COPY --from=upstream-resources /usr/src/app/md_source/. ./
RUN ./_scripts/update-api-toc.sh
ARG JEKYLL_ENV
RUN echo "Building docs for ${JEKYLL_ENV} environment"
RUN set -eux; \
RUN set -eu; \
if [ "${JEKYLL_ENV}" = "production" ]; then \
jekyll build -d ${TARGET} --config _config.yml,_config_production.yml; \
jekyll build --profile -d ${TARGET} --config _config.yml,_config_production.yml; \
sed -i 's#<loc>/#<loc>https://docs.docker.com/#' "${TARGET}/sitemap.xml"; \
else \
jekyll build -d ${TARGET}; \
jekyll build --profile -d ${TARGET}; \
fi; \
find ${TARGET} -type f -name '*.html' | while read i; do sed -i 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g' "$i"; done; \
sed -i 's#<loc>/#<loc>https://docs.docker.com/#' "${TARGET}/sitemap.xml";
find ${TARGET} -type f -name '*.html' | while read i; do sed -i 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g' "$i"; done;
# This stage only contains the generated files. It can be used to host the