diff --git a/.dockerignore b/.dockerignore index 39cbf7e42e..d8aeadb486 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,7 @@ .dockerignore .git +.github +.jekyll-metadata .gitignore Dockerfile docker-compose.yml diff --git a/Dockerfile b/Dockerfile index 8eeb89b0cb..8744ae7c96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,11 @@ -FROM docs/docker.github.io:docs-base +# Set to the version for this archive +ARG VER=v17.06 -# docs-base contains: GitHub Pages, nginx, wget, svn, and the docs archives, -# running on Alpine. See the contents of docs-base at: -# https://github.com/docker/docker.github.io/tree/docs-base +# This image comes from the Dockerfile.builder.onbuild file in the publish-tools branch +# https://github.com/docker/docker.github.io/blob/publish-tools/Dockerfile.builder.onbuild +FROM docs/docker.github.io:docs-builder-onbuild AS builder -# First, build non-edge (all of this is duplicated later -- that is on purpose) - -# Copy master into target directory (skipping files / folders in .dockerignore) -# These files represent the current docs -COPY . md_source - -# Move built html into md_source directory so we can reuse the target directory -# to hold the static output. -# Pull reference docs from upstream locations, then build the master docs -# into static HTML in the "target" directory using Jekyll -# then nuke the md_source directory. - -## Branch to pull from, per ref doc -## To get master from svn the svn branch needs to be 'trunk'. To get a branch from svn it needs to be 'branches/branchname' - -# Engine -ENV ENGINE_SVN_BRANCH="branches/17.06.x" -ENV ENGINE_BRANCH="17.06.x" - -# Distribution -ENV DISTRIBUTION_SVN_BRANCH="branches/release/2.6" -ENV DISTRIBUTION_BRANCH="release/2.6" - -RUN jekyll build -s md_source -d target --config md_source/_config.yml \ - && rm -rf target/apidocs/layouts \ - && find target -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \ - && rm -rf md_source +# Reset the docs/docker.github.io:nginx-onbuild image, which is based on nginx:alpine +# This image comes from the Dockerfule.nginx.onbuild in the publish-tools branch +# https://github.com/docker/docker.github.io/blob/publish-tools/Dockerfile.nginx.onbuild +FROM docs/docker.github.io:nginx-onbuild diff --git a/Gemfile b/Gemfile index b521bb46e7..241e8e3d9b 100644 --- a/Gemfile +++ b/Gemfile @@ -3,5 +3,5 @@ source "https://rubygems.org" # Update me once in a while: https://github.com/github/pages-gem/releases # Please ensure, before upgrading, that this version exists as a tag in starefossen/github-pages here: # https://hub.docker.com/r/starefossen/github-pages/tags/ -gem "github-pages", "137" +gem "github-pages", "147" gem 'wdm', '>= 0.1.0' if Gem.win_platform? diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index 84f0349a4d..0000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,25 +0,0 @@ -wrappedNode(label: 'linux && x86_64') { - timeout(time: 60, unit: 'MINUTES') { - deleteDir() - stage "checkout" - checkout scm - sh "git submodule update --init --recursive" - stage "test" - - /* Jekyll creates html files to implement client side redirects. - There are absolute links to docs.docker.com in these htmls - we don't want them to be parsed by the tests for now. - Removing jekyll-redirect-from option will make sure these pages - are not generated when building with Jekyll. */ - sh "awk '/jekyll-redirect-from/{n=1}; n {n--; next}; 1' < _config.yml > _config.yml.tmp" - sh "mv _config.yml.tmp _config.yml" - - sh "docker build -t docs:${JOB_BASE_NAME}-${BUILD_NUMBER} `pwd`" - sh "docker build -t tests:${JOB_BASE_NAME}-${BUILD_NUMBER} `pwd`/tests" - sh "docker run -v /usr/src/app/allvbuild --name docs-${JOB_BASE_NAME}-${BUILD_NUMBER} docs:${JOB_BASE_NAME}-${BUILD_NUMBER} /bin/true" - sh "docker run --rm --volumes-from docs-${JOB_BASE_NAME}-${BUILD_NUMBER} -v `pwd`:/docs tests:${JOB_BASE_NAME}-${BUILD_NUMBER}" - sh "docker rm -fv docs-${JOB_BASE_NAME}-${BUILD_NUMBER}" - sh "docker rmi docs:${JOB_BASE_NAME}-${BUILD_NUMBER} tests:${JOB_BASE_NAME}-${BUILD_NUMBER}" - deleteDir() - } -} diff --git a/_config.yml b/_config.yml index 85311dc846..00ce949ba9 100644 --- a/_config.yml +++ b/_config.yml @@ -10,13 +10,9 @@ incremental: true permalink: pretty safe: false lsi: false -url: https://docs.docker.com +url: https://docs.docker.com/v17.06 keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13", "v17.03"] - -collections: - samples: - output: true - +exclude: ["Dockerfile", "Gemfile", "Gemfile.lock", "hooks", "_scripts", ".git", ".github", '*.gliffy', '*.snagproj', '*.plist', '*.diff'] gems: - jekyll-redirect-from - jekyll-seo-tag diff --git a/css/api-reference.css b/css/api-reference.css new file mode 100644 index 0000000000..bd67b28405 --- /dev/null +++ b/css/api-reference.css @@ -0,0 +1,25 @@ +/** + * Styles for the Swagger API documentation (engine/api/v1.x/index.html) + */ + + +/* ReDoc doesn't change outer page styles */ +body { + margin: 0; + padding: 0; +} +api-logo { + background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%); + height: 100px; + text-align: left !important; +} +api-logo img { + width: 136px !important; + margin: 32px 0 0 50px; +} +/** + * Disable request-type badges, see https://github.com/Rebilly/ReDoc/issues/61 + */ +redoc .operation-type { + display: none !important; +} diff --git a/engine/api/v1.25/index.html b/engine/api/v1.25/index.html index 970c22733a..2a76997bb3 100644 --- a/engine/api/v1.25/index.html +++ b/engine/api/v1.25/index.html @@ -11,27 +11,10 @@ redirect_from: - - +