From 8d4459fffb5c1885b65506093538e059f0b51d90 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 25 Feb 2015 10:37:36 +1000 Subject: [PATCH] Don't require Docker 1.5.0 for docker build -f docs/Dockerfile Signed-off-by: Sven Dowideit --- Makefile | 9 ++++++++- docs/Dockerfile | 10 ++++++---- docs/mkdocs.yml | 2 +- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8747e6ae6a..1c71e00fad 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,9 @@ DOCKER_RUN_DOCKER := docker run --rm -it --privileged $(DOCKER_ENVS) $(DOCKER_MO DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE +# for some docs workarounds (see below in "docs-build" target) +GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null) + default: binary all: build @@ -84,7 +87,11 @@ build: bundles docs-build: git fetch https://github.com/docker/docker.git docs && git diff --name-status FETCH_HEAD...HEAD -- docs > docs/changed-files - docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile . + cp ./VERSION docs/VERSION + echo "$(GIT_BRANCH)" > docs/GIT_BRANCH +# echo "$(AWS_S3_BUCKET)" > docs/AWS_S3_BUCKET + echo "$(GITCOMMIT)" > docs/GITCOMMIT + docker build -t "$(DOCKER_DOCS_IMAGE)" docs bundles: mkdir bundles diff --git a/docs/Dockerfile b/docs/Dockerfile index caa291dffb..0b5b33b29f 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -11,14 +11,16 @@ COPY . /src RUN git reset --hard # Then copy the desired docs into the /docs/sources/ dir -COPY ./docs/sources/ /docs/sources +COPY ./sources/ /docs/sources COPY ./VERSION VERSION -COPY ./image/spec/v1.md /docs/sources/reference/image-spec-v1.md +# adding the image spec will require Docker 1.5 and `docker build -f docs/Dockerfile .` +#COPY ./image/spec/v1.md /docs/sources/reference/image-spec-v1.md + # TODO: don't do this - look at merging the yml file in build.sh -COPY ./docs/mkdocs.yml mkdocs.yml -COPY ./docs/s3_website.json s3_website.json +COPY ./mkdocs.yml mkdocs.yml +COPY ./s3_website.json s3_website.json # Docker Swarm ADD https://raw.githubusercontent.com/docker/swarm/master/docs/mkdocs.yml /docs/mkdocs-swarm.yml diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 1bd3b93fae..f79f743c63 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -118,7 +118,7 @@ pages: - ['reference/api/registry_api.md', 'Reference', 'Docker Registry API'] - ['reference/api/registry_api_client_libraries.md', 'Reference', 'Docker Registry API Client Libraries'] - ['reference/api/hub_registry_spec.md', 'Reference', 'Docker Hub and Registry Spec'] -- ['reference/image-spec-v1.md', 'Reference', 'Docker Image Specification v1.0.0'] +#- ['reference/image-spec-v1.md', 'Reference', 'Docker Image Specification v1.0.0'] - ['reference/api/docker_remote_api.md', 'Reference', 'Docker Remote API'] - ['reference/api/docker_remote_api_v1.18.md', 'Reference', 'Docker Remote API v1.18'] - ['reference/api/docker_remote_api_v1.17.md', 'Reference', 'Docker Remote API v1.17']