Improve archival dockerfile (#5365)

This commit is contained in:
Misty Stanley-Jones
2017-12-26 20:52:51 -08:00
committed by GitHub
parent 684cee0b69
commit 6bf0e7ac32
5 changed files with 22 additions and 17 deletions

View File

@@ -1,2 +1,7 @@
.git
.github
.jekyll-metadata
.gitignore
Dockerfile
docker-compose.yml
_site

View File

@@ -1,3 +1,11 @@
FROM starefossen/github-pages:onbuild
# Set to the version for this archive
ARG VER=v1.5
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
View 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"

View File

@@ -1 +1 @@
exclude: [src]
exclude: ["src","highlight","hooks"]

View File

@@ -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