Skip to content

Commit 47f6eb7

Browse files
author
Misty Stanley-Jones
authored
Improve archival dockerfile (#5357)
1 parent 280baf0 commit 47f6eb7

23 files changed

+62
-518
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.dockerignore
22
.git
3+
.github
4+
.jekyll-metadata
35
.gitignore
46
Dockerfile
57
docker-compose.yml

Dockerfile

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,11 @@
1-
FROM docs/docker.github.io:docs-base
1+
# Set to the version for this archive
2+
ARG VER=v17.06
23

3-
# docs-base contains: GitHub Pages, nginx, wget, svn, and the docs archives,
4-
# running on Alpine. See the contents of docs-base at:
5-
# https://github.com/docker/docker.github.io/tree/docs-base
4+
# This image comes from the Dockerfile.builder.onbuild file in the publish-tools branch
5+
# https://github.com/docker/docker.github.io/blob/publish-tools/Dockerfile.builder.onbuild
6+
FROM docs/docker.github.io:docs-builder-onbuild AS builder
67

7-
# First, build non-edge (all of this is duplicated later -- that is on purpose)
8-
9-
# Copy master into target directory (skipping files / folders in .dockerignore)
10-
# These files represent the current docs
11-
COPY . md_source
12-
13-
# Move built html into md_source directory so we can reuse the target directory
14-
# to hold the static output.
15-
# Pull reference docs from upstream locations, then build the master docs
16-
# into static HTML in the "target" directory using Jekyll
17-
# then nuke the md_source directory.
18-
19-
## Branch to pull from, per ref doc
20-
## To get master from svn the svn branch needs to be 'trunk'. To get a branch from svn it needs to be 'branches/branchname'
21-
22-
# Engine
23-
ENV ENGINE_SVN_BRANCH="branches/17.06.x"
24-
ENV ENGINE_BRANCH="17.06.x"
25-
26-
# Distribution
27-
ENV DISTRIBUTION_SVN_BRANCH="branches/release/2.6"
28-
ENV DISTRIBUTION_BRANCH="release/2.6"
29-
30-
RUN jekyll build -s md_source -d target --config md_source/_config.yml \
31-
&& rm -rf target/apidocs/layouts \
32-
&& find target -type f -name '*.html' -print0 | xargs -0 sed -i 's#href="https://docs.docker.com/#href="/#g' \
33-
&& rm -rf md_source
8+
# Reset the docs/docker.github.io:nginx-onbuild image, which is based on nginx:alpine
9+
# This image comes from the Dockerfule.nginx.onbuild in the publish-tools branch
10+
# https://github.com/docker/docker.github.io/blob/publish-tools/Dockerfile.nginx.onbuild
11+
FROM docs/docker.github.io:nginx-onbuild

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ source "https://rubygems.org"
33
# Update me once in a while: https://github.com/github/pages-gem/releases
44
# Please ensure, before upgrading, that this version exists as a tag in starefossen/github-pages here:
55
# https://hub.docker.com/r/starefossen/github-pages/tags/
6-
gem "github-pages", "137"
6+
gem "github-pages", "147"
77
gem 'wdm', '>= 0.1.0' if Gem.win_platform?

Jenkinsfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

_config.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ incremental: true
1010
permalink: pretty
1111
safe: false
1212
lsi: false
13-
url: https://docs.docker.com
13+
url: https://docs.docker.com/v17.06
1414
keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13", "v17.03"]
15-
16-
collections:
17-
samples:
18-
output: true
19-
15+
exclude: ["Dockerfile", "Gemfile", "Gemfile.lock", "hooks", "_scripts", ".git", ".github", '*.gliffy', '*.snagproj', '*.plist', '*.diff']
2016
gems:
2117
- jekyll-redirect-from
2218
- jekyll-seo-tag

css/api-reference.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Styles for the Swagger API documentation (engine/api/v1.x/index.html)
3+
*/
4+
5+
6+
/* ReDoc doesn't change outer page styles */
7+
body {
8+
margin: 0;
9+
padding: 0;
10+
}
11+
api-logo {
12+
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
13+
height: 100px;
14+
text-align: left !important;
15+
}
16+
api-logo img {
17+
width: 136px !important;
18+
margin: 32px 0 0 50px;
19+
}
20+
/**
21+
* Disable request-type badges, see https://github.com/Rebilly/ReDoc/issues/61
22+
*/
23+
redoc .operation-type {
24+
display: none !important;
25+
}

engine/api/v1.25/index.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,10 @@
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<meta name="description" content="Reference for the API served by Docker Engine.">
1313
<meta charset="utf-8"/>
14-
<!--
15-
ReDoc doesn't change outer page styles
16-
-->
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
api-logo {
23-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
24-
height: 100px;
25-
text-align: left !important;
26-
}
27-
api-logo img {
28-
width: 136px !important;
29-
margin: 32px 0 0 50px;
30-
}
31-
</style>
14+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3215
</head>
3316
<body>
3417
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
35-
<script src="redoc.1.11.0.min.js"> </script>
18+
<script src="/js/redoc.min.js"> </script>
3619
</body>
3720
</html>

engine/api/v1.25/redoc.1.11.0.min.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

engine/api/v1.26/index.html

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,10 @@
1111
<meta name="viewport" content="width=device-width, initial-scale=1">
1212
<meta name="description" content="Reference for the API served by Docker Engine.">
1313
<meta charset="utf-8"/>
14-
<!--
15-
ReDoc doesn't change outer page styles
16-
-->
17-
<style>
18-
body {
19-
margin: 0;
20-
padding: 0;
21-
}
22-
api-logo {
23-
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
24-
height: 100px;
25-
text-align: left !important;
26-
}
27-
api-logo img {
28-
width: 136px !important;
29-
margin: 32px 0 0 50px;
30-
}
31-
</style>
14+
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
3215
</head>
3316
<body>
3417
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
35-
<script src="redoc.1.11.0.min.js"> </script>
18+
<script src="/js/redoc.min.js"> </script>
3619
</body>
3720
</html>

engine/api/v1.26/redoc.1.11.0.min.js

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)