diff --git a/Makefile b/Makefile index 8747e6ae6a35e..1c71e00fad24f 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 caa291dffb001..0b5b33b29f5c1 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 1bd3b93faeedf..f79f743c63b2c 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']