mirror of
https://github.com/docker/docs.git
synced 2026-03-27 06:18:55 +07:00
Improve archival dockerfile (#5356)
This commit is contained in:
committed by
GitHub
parent
3ff7a997e8
commit
13fef5edad
@@ -1,5 +1,7 @@
|
||||
.dockerignore
|
||||
.git
|
||||
.github
|
||||
.jekyll-metadata
|
||||
.gitignore
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,5 +1,11 @@
|
||||
FROM starefossen/github-pages:137
|
||||
# Set to the version for this archive
|
||||
ARG VER=v17.03
|
||||
|
||||
COPY . /usr/src/app
|
||||
# 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
|
||||
|
||||
CMD bundle exec jekyll serve -d /_site --watch -H 0.0.0.0 -P 4000
|
||||
# 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
|
||||
2
Gemfile
2
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?
|
||||
|
||||
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
@@ -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()
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,9 @@ incremental: true
|
||||
permalink: pretty
|
||||
safe: false
|
||||
lsi: false
|
||||
url: https://docs.docker.com
|
||||
url: https://docs.docker.com/v17.03
|
||||
keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13"]
|
||||
compose_current: 1.14.0
|
||||
|
||||
exclude: ["Dockerfile", "Gemfile", "Gemfile.lock", "hooks", "_scripts", ".git", ".github", '*.gliffy', '*.snagproj', '*.plist', '*.diff']
|
||||
gems:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-seo-tag
|
||||
|
||||
25
css/api-reference.css
Normal file
25
css/api-reference.css
Normal file
@@ -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;
|
||||
}
|
||||
@@ -11,27 +11,10 @@ redirect_from:
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Reference for the API served by Docker Engine.">
|
||||
<meta charset="utf-8"/>
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
|
||||
<script src="redoc.1.11.0.min.js"> </script>
|
||||
<script src="/js/redoc.min.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
44
engine/api/v1.25/redoc.1.11.0.min.js
vendored
44
engine/api/v1.25/redoc.1.11.0.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -11,27 +11,10 @@ redirect_from:
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Reference for the API served by Docker Engine.">
|
||||
<meta charset="utf-8"/>
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
|
||||
<script src="redoc.1.11.0.min.js"> </script>
|
||||
<script src="/js/redoc.min.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
44
engine/api/v1.26/redoc.1.11.0.min.js
vendored
44
engine/api/v1.26/redoc.1.11.0.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -11,27 +11,10 @@ redirect_from:
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Reference for the API served by Docker Engine.">
|
||||
<meta charset="utf-8"/>
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
|
||||
<script src="redoc.1.11.0.min.js"> </script>
|
||||
<script src="/js/redoc.min.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
44
engine/api/v1.27/redoc.1.11.0.min.js
vendored
44
engine/api/v1.27/redoc.1.11.0.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -11,27 +11,10 @@ redirect_from:
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Reference for the API served by Docker Engine.">
|
||||
<meta charset="utf-8"/>
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
|
||||
<script src="redoc.1.11.0.min.js"> </script>
|
||||
<script src="/js/redoc.min.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
44
engine/api/v1.28/redoc.1.11.0.min.js
vendored
44
engine/api/v1.28/redoc.1.11.0.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -9,27 +9,10 @@ layout: null
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Reference for the API served by Docker Engine.">
|
||||
<meta charset="utf-8"/>
|
||||
<!--
|
||||
ReDoc doesn't change outer page styles
|
||||
-->
|
||||
<style>
|
||||
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;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
|
||||
</head>
|
||||
<body>
|
||||
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
|
||||
<script src="redoc.1.11.0.min.js"> </script>
|
||||
<script src="/js/redoc.min.js"> </script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
44
engine/api/v1.29/redoc.1.11.0.min.js
vendored
44
engine/api/v1.29/redoc.1.11.0.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# If this is an archive branch (like v1.4 or v1.11),
|
||||
# build and push the docs-base branch at the end of
|
||||
# a successful build of the branch
|
||||
|
||||
if [[ $SOURCE_BRANCH =~ (^v1\.[0-9]+$|^v1[7-9]\.[0-9]+$) ]]; then
|
||||
git fetch origin docs-base:docs-base --depth 1 || ( echo "Couldn't fetch docs-base." && exit 1 )
|
||||
git checkout docs-base || ( echo "Couldn't check out docs-base." && exit 1 )
|
||||
docker build -t docs/docker.github.io:docs-base . || ( echo "Couldn't build docs-base Dockerfile." && exit 1 )
|
||||
docker push docs/docker.github.io:docs-base || ( echo "Coudn't push new docs-base image." && exit 1 )
|
||||
fi
|
||||
8
js/redoc.min.js
vendored
Executable file
8
js/redoc.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
1
js/redoc.min.map
Executable file
1
js/redoc.min.map
Executable file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user