mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Improve archival dockerfile (#5358)
This commit is contained in:
committed by
GitHub
parent
4f44144ffb
commit
ef887fdca3
@@ -1,2 +1,7 @@
|
||||
.git
|
||||
.github
|
||||
.jekyll-metadata
|
||||
.gitignore
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
_site
|
||||
|
||||
12
Dockerfile
12
Dockerfile
@@ -1,3 +1,11 @@
|
||||
FROM starefossen/github-pages:onbuild
|
||||
# Set to the version for this archive
|
||||
ARG VER=v1.11
|
||||
|
||||
CMD jekyll serve -d /_site --watch -H 0.0.0.0 -P 4000
|
||||
# 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
|
||||
|
||||
# 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
|
||||
|
||||
6
Gemfile
Normal file
6
Gemfile
Normal file
@@ -0,0 +1,6 @@
|
||||
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", "147"
|
||||
@@ -1 +1 @@
|
||||
exclude: [src]
|
||||
exclude: ["src","hooks"]
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user