-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into distribution_docs…
…_from_upstream
- Loading branch information
Showing
46 changed files
with
1,250 additions
and
420 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.dockerignore | ||
.git | ||
.gitignore | ||
Dockerfile | ||
docker-compose.yml |
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,103 +1,35 @@ | ||
FROM starefossen/github-pages | ||
|
||
# Basic Git set-up for throwaway commits | ||
RUN git config --global user.email "gordon@docker.com" | ||
RUN git config --global user.name "Gordon" | ||
|
||
# Clone the docs repo | ||
RUN git clone https://www.github.com/docker/docker.github.io allv | ||
ENV VERSIONS="v1.4 v1.5 v1.6 v1.7 v1.8 v1.9 v1.10 v1.11" | ||
|
||
# Create archive; check out each version, create HTML, tweak links | ||
RUN git clone https://www.github.com/docker/docker.github.io temp; \ | ||
for VER in $VERSIONS; do \ | ||
git --git-dir=./temp/.git --work-tree=./temp checkout ${VER} \ | ||
&& 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#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'; \ | ||
done; \ | ||
rm -rf temp | ||
|
||
COPY . allv | ||
|
||
## Branch to pull from, per ref doc | ||
ENV ENGINE_BRANCH="1.12.x" | ||
ENV DISTRIBUTION_BRANCH="release/2.5" | ||
|
||
# Engine | ||
# Get docker/docker ref docs from $ENGINE_BRANCH branch to be used in master builds | ||
# Uses Github Subversion gateway to limit the checkout | ||
RUN svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/reference allv/engine/reference | ||
RUN svn co https://github.com/docker/docker/branches/$ENGINE_BRANCH/docs/extend allv/engine/extend | ||
# Can't use the svn trick to get a single file, use wget instead | ||
RUN wget -O allv/engine/deprecated.md https://raw.githubusercontent.com/docker/docker/$ENGINE_BRANCH/docs/deprecated.md | ||
# Make a temporary commit for the files we added so we can check out other branches later | ||
RUN git --git-dir=./allv/.git --work-tree=./allv add engine | ||
RUN git --git-dir=./allv/.git --work-tree=./allv commit -m "Temporary commit" | ||
|
||
# Distribution | ||
# Get docker/distribution ref docs from $DISTRIBUTION_BRANCH tag to be used in master builds | ||
# Uses Github Subversion gateway to limit the checkout | ||
RUN svn co https://github.com/docker/distribution/branches/$DISTRIBUTION_BRANCH/docs/spec allv/registry/spec | ||
# Can't use the svn trick to get a single file, use wget instead | ||
RUN wget -O allv/registry/configuration.md https://raw.githubusercontent.com/docker/distribution/$DISTRIBUTION_BRANCH/docs/configuration.md | ||
# Make a temporary commit for the files we added so we can check out other branches later | ||
RUN git --git-dir=./allv/.git --work-tree=./allv add registry | ||
RUN git --git-dir=./allv/.git --work-tree=./allv commit -m "Temporary commit" | ||
|
||
# Create HTML for master | ||
RUN jekyll build -s allv -d allvbuild | ||
|
||
# Check out 1.4 branch, create HTML, tweak links | ||
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' | ||
|
||
# Check out 1.5 branch, create HTML, tweak links | ||
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' | ||
|
||
# Check out 1.6, create HTML, tweak links | ||
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' | ||
|
||
# Check out 1.7, create HTML, tweak links | ||
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' | ||
|
||
# Check out 1.8, create HTML, tweak links | ||
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' | ||
|
||
# Check out 1.9, create HTML, tweak links | ||
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' | ||
|
||
# Check out 1.10, create HTML, tweak links | ||
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' | ||
# The statements below pull reference docs from upstream locations, | ||
# then build the whole site to static HTML using Jekyll | ||
|
||
# Check out 1.11, create HTML, tweak links | ||
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' | ||
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 | ||
|
||
# Serve the site, which is now all static HTML | ||
CMD jekyll serve -s /usr/src/app/allvbuild -d /_site --no-watch -H 0.0.0.0 -P 4000 |
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,3 +1,3 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "github-pages", "104" #Update me once in a while: https://github.com/github/pages-gem/releases | ||
gem "github-pages", "105" #Update me once in a while: https://github.com/github/pages-gem/releases |
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
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
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
Oops, something went wrong.