From a3dd8ff96e2775c7aaff0576ec95978924ede0ca Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Sat, 11 Feb 2017 02:55:39 -0800 Subject: [PATCH] Switch to auto-building source of docs-base --- Dockerfile | 6 +-- _data/docsarchive/docs-base/Dockerfile | 51 -------------------------- _data/docsarchive/docs-base/index.html | 16 -------- _data/docsarchive/docs-base/nginx.conf | 17 --------- 4 files changed, 3 insertions(+), 87 deletions(-) delete mode 100644 _data/docsarchive/docs-base/Dockerfile delete mode 100644 _data/docsarchive/docs-base/index.html delete mode 100644 _data/docsarchive/docs-base/nginx.conf diff --git a/Dockerfile b/Dockerfile index 1200164880..23101d974e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM docs/docs-base +FROM docs/docker.github.io:docs-base # docs-base contains: GitHub Pages, nginx, and the docs archives, running on -# Debian Jesse. See the Dockerfile for docs-base at: -# _data/docsarchive/docs-base in the docs repo +# Debian Jesse. See the contents of docs-base at: +# https://github.com/docker/docker.github.io/tree/docs-base # Copy master into target directory (skipping files / folders in .dockerignore) # These files represent the current docs diff --git a/_data/docsarchive/docs-base/Dockerfile b/_data/docsarchive/docs-base/Dockerfile deleted file mode 100644 index 40e9d523e3..0000000000 --- a/_data/docsarchive/docs-base/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -FROM starefossen/github-pages:112 - -# This is the source for docs/docs-base. Push to that location to ensure that -# the production image gets your update :) - -# Install nginx - -ENV NGINX_VERSION 1.11.9-1~jessie - -RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \ - && echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y \ - ca-certificates \ - nginx=${NGINX_VERSION} \ - && rm -rf /var/lib/apt/lists/* - -# Forward nginx request and error logs to docker log collector - -RUN ln -sf /dev/stdout /var/log/nginx/access.log \ - && ln -sf /dev/stderr /var/log/nginx/error.log - -COPY nginx.conf /etc/nginx/nginx.conf - -## At the end of each layer, everything we need to pass on to the next layer -## should be in the "target" directory and we should have removed all temporary files - -# Create archive; check out each version, create HTML under target/$VER, tweak links -# Nuke the archive_source directory. Only keep the target directory. - -ENV VERSIONS="v1.4 v1.5 v1.6 v1.7 v1.8 v1.9 v1.10 v1.11 v1.12" - -RUN git clone https://www.github.com/docker/docker.github.io archive_source; \ - for VER in $VERSIONS; do \ - git --git-dir=./archive_source/.git --work-tree=./archive_source checkout ${VER} \ - && mkdir -p target/${VER} \ - && jekyll build -s archive_source -d target/${VER} \ - && find target/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="/#href="/'"$VER"'/#g' \ - && find target/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#src="/#src="/'"$VER"'/#g' \ - && find target/${VER} -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/'"$VER"'/#g'; \ - done; \ - rm -rf archive_source - -# This index file gets overwritten, but it serves a sort-of useful purpose in -# making the docs/docs-base image browsable: - -COPY index.html target - -# Serve the site (target), which is now all static HTML - -CMD echo "Docker docs are viewable at:" && echo "http://0.0.0.0:4000" && exec nginx diff --git a/_data/docsarchive/docs-base/index.html b/_data/docsarchive/docs-base/index.html deleted file mode 100644 index 40d181eca6..0000000000 --- a/_data/docsarchive/docs-base/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - -

Docs archive

- - - diff --git a/_data/docsarchive/docs-base/nginx.conf b/_data/docsarchive/docs-base/nginx.conf deleted file mode 100644 index a572845c37..0000000000 --- a/_data/docsarchive/docs-base/nginx.conf +++ /dev/null @@ -1,17 +0,0 @@ -worker_processes 1; -daemon off; - -events { - worker_connections 1024; -} - -http { - server { - root /usr/src/app/target; - port_in_redirect off; - location / { - include /etc/nginx/mime.types; - } - listen 4000; - } -}