Skip to content

Commit

Permalink
forgotten absolute links in Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Duermael <adrien@duermael.com>
  • Loading branch information
aduermael committed Dec 14, 2016
1 parent e2b1bd5 commit ca54f76
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ RUN git clone https://www.github.com/docker/docker.github.io temp; \
&& mkdir -p allvbuild/${VER} \
&& jekyll build -s temp -d allvbuild/${VER} \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="http://docs.docker.com/#href="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com#href="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="http://docs.docker.com#href="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/'"$VER"'/#g'; \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="https://docs.docker.com/#src="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="http://docs.docker.com/#src="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="https://docs.docker.com#src="/'"$VER"'/#g' \
&& find allvbuild/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="http://docs.docker.com#src="/'"$VER"'/#g'; \
done; \
rm -rf temp

Expand All @@ -24,12 +31,21 @@ ENV DISTRIBUTION_BRANCH="release/2.5"
# then build the whole site to static HTML using Jekyll

RUN svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/reference allv/engine/reference \
&& svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/extend allv/engine/extend \
&& wget -O allv/engine/deprecated.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/deprecated.md \
&& svn co https://github.com/docker/distribution/branches/$DISTRIBUTION_BRANCH/docs/spec allv/registry/spec \
&& wget -O allv/registry/configuration.md https://raw.githubusercontent.com/docker/distribution/$DISTRIBUTION_BRANCH/docs/configuration.md \
&& jekyll build -s allv -d allvbuild \
&& rm -rf allv
&& svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/extend allv/engine/extend \
&& wget -O allv/engine/deprecated.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/deprecated.md \
&& svn co https://github.com/docker/distribution/branches/$DISTRIBUTION_BRANCH/docs/spec allv/registry/spec \
&& wget -O allv/registry/configuration.md https://raw.githubusercontent.com/docker/distribution/$DISTRIBUTION_BRANCH/docs/configuration.md \
&& jekyll build -s allv -d allvbuild \
&& rm -rf allv

RUN find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="http://docs.docker.com/#href="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com#href="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="http://docs.docker.com#href="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="https://docs.docker.com/#src="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="http://docs.docker.com/#src="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="https://docs.docker.com#src="/#g' \
&& find allvbuild -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="http://docs.docker.com#src="/#g'

# Serve the site, which is now all static HTML
CMD jekyll serve -s /usr/src/app/allvbuild --no-watch -H 0.0.0.0 -P 4000

0 comments on commit ca54f76

Please sign in to comment.