forked from docker/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create subdirectory-based docs archive
- Loading branch information
1 parent
277e83c
commit 9e96e48
Showing
1 changed file
with
58 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,62 @@ | ||
FROM starefossen/github-pages:onbuild | ||
FROM starefossen/github-pages | ||
|
||
ONBUILD RUN git clone https://www.github.com/docker/docker.github.io docs | ||
RUN git clone https://www.github.com/docker/docker.github.io allv | ||
RUN jekyll build -s allv -d allvbuild | ||
|
||
ONBUILD WORKDIR docs | ||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.4 | ||
RUN mkdir allvbuild/v1.4 | ||
RUN jekyll build -s allv -d allvbuild/v1.4 | ||
RUN find allvbuild/v1.4 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.4/#g' | ||
RUN find allvbuild/v1.4 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.4/#g' | ||
RUN find allvbuild/v1.4 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.4/#g' | ||
|
||
ONBUILD COPY . /usr/src/app | ||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.5 | ||
RUN mkdir allvbuild/v1.5 | ||
RUN jekyll build -s allv -d allvbuild/v1.5 | ||
RUN find allvbuild/v1.5 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.5/#g' | ||
RUN find allvbuild/v1.5 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.5/#g' | ||
RUN find allvbuild/v1.5 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.5/#g' | ||
|
||
CMD jekyll serve -d /_site --watch -H 0.0.0.0 -P 4000 | ||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.6 | ||
RUN mkdir allvbuild/v1.6 | ||
RUN jekyll build -s allv -d allvbuild/v1.6 | ||
RUN find allvbuild/v1.6 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.6/#g' | ||
RUN find allvbuild/v1.6 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.6/#g' | ||
RUN find allvbuild/v1.6 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.6/#g' | ||
|
||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.7 | ||
RUN mkdir allvbuild/v1.7 | ||
RUN jekyll build -s allv -d allvbuild/v1.7 | ||
RUN find allvbuild/v1.7 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.7/#g' | ||
RUN find allvbuild/v1.7 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.7/#g' | ||
RUN find allvbuild/v1.7 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.7/#g' | ||
|
||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.8 | ||
RUN mkdir allvbuild/v1.8 | ||
RUN jekyll build -s allv -d allvbuild/v1.8 | ||
RUN find allvbuild/v1.8 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.8/#g' | ||
RUN find allvbuild/v1.8 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.8/#g' | ||
RUN find allvbuild/v1.8 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.8/#g' | ||
|
||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.9 | ||
RUN mkdir allvbuild/v1.9 | ||
RUN jekyll build -s allv -d allvbuild/v1.9 | ||
RUN find allvbuild/v1.9 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.9/#g' | ||
RUN find allvbuild/v1.9 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.9/#g' | ||
RUN find allvbuild/v1.9 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.9/#g' | ||
|
||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.10 | ||
RUN mkdir allvbuild/v1.10 | ||
RUN jekyll build -s allv -d allvbuild/v1.10 | ||
RUN find allvbuild/v1.10 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.10/#g' | ||
RUN find allvbuild/v1.10 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.10/#g' | ||
RUN find allvbuild/v1.10 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.10/#g' | ||
|
||
RUN git --git-dir=./allv/.git --work-tree=./allv checkout v1.11 | ||
RUN mkdir allvbuild/v1.11 | ||
RUN jekyll build -s allv -d allvbuild/v1.11 | ||
RUN find allvbuild/v1.11 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/v1.11/#g' | ||
RUN find allvbuild/v1.11 -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/v1.11/#g' | ||
RUN find allvbuild/v1.11 -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/v1.11/#g' | ||
|
||
CMD jekyll serve -s /usr/src/app/allvbuild -d /_site --no-watch -H 0.0.0.0 -P 4000 |