From 3e84b9e56abdff7230e84a1830085c79c73aa3b7 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 18 Feb 2015 14:20:46 +1000 Subject: [PATCH] Import docs from swarm, machine and compose repositories, Also add the image spec from the code area to show we're building from the repo-root now Signed-off-by: Sven Dowideit --- Makefile | 13 ++++--------- docs/Dockerfile | 39 +++++++++++++++++++++++++++++++++++++-- docs/mkdocs-compose.yml | 5 ----- docs/mkdocs-machine.yml | 2 -- docs/mkdocs-swarm.yml | 5 ----- docs/mkdocs.yml | 1 + 6 files changed, 42 insertions(+), 23 deletions(-) delete mode 100644 docs/mkdocs-compose.yml delete mode 100644 docs/mkdocs-machine.yml delete mode 100644 docs/mkdocs-swarm.yml diff --git a/Makefile b/Makefile index 812003c6c6..8747e6ae6a 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,6 @@ 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 @@ -54,7 +51,9 @@ docs-shell: docs-build $(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash docs-release: docs-build - $(DOCKER_RUN_DOCS) -e OPTIONS -e BUILD_ROOT -e DISTRIBUTION_ID "$(DOCKER_DOCS_IMAGE)" ./release.sh + $(DOCKER_RUN_DOCS) -e OPTIONS -e BUILD_ROOT -e DISTRIBUTION_ID \ + -v $(CURDIR)/docs/awsconfig:/docs/awsconfig \ + "$(DOCKER_DOCS_IMAGE)" ./release.sh docs-test: docs-build $(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" ./test.sh @@ -85,11 +84,7 @@ build: bundles docs-build: git fetch https://github.com/docker/docker.git docs && git diff --name-status FETCH_HEAD...HEAD -- docs > docs/changed-files - 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 + docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile . bundles: mkdir bundles diff --git a/docs/Dockerfile b/docs/Dockerfile index 90897e09aa..caa291dffb 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -4,5 +4,40 @@ FROM docs/base:latest MAINTAINER Sven Dowideit (@SvenDowideit) -COPY . /docs -RUN ./build.sh +# TODO: need the full repo source to get the git version info +COPY . /src + +# Reset the /docs dir so we can replace the theme meta with the new repo's git info +RUN git reset --hard + +# Then copy the desired docs into the /docs/sources/ dir +COPY ./docs/sources/ /docs/sources + +COPY ./VERSION VERSION + +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 + +# Docker Swarm +ADD https://raw.githubusercontent.com/docker/swarm/master/docs/mkdocs.yml /docs/mkdocs-swarm.yml +ADD https://raw.githubusercontent.com/docker/swarm/master/docs/index.md /docs/sources/swarm/index.md +ADD https://raw.githubusercontent.com/docker/swarm/master/discovery/README.md /docs/sources/swarm/discovery.md +ADD https://raw.githubusercontent.com/docker/swarm/master/api/README.md /docs/sources/swarm/API.md +ADD https://raw.githubusercontent.com/docker/swarm/master/scheduler/filter/README.md /docs/sources/swarm/scheduler/filter.md +ADD https://raw.githubusercontent.com/docker/swarm/master/scheduler/strategy/README.md /docs/sources/swarm/scheduler/strategy.md + +# Docker Machine +ADD https://raw.githubusercontent.com/docker/machine/master/docs/mkdocs.yml /docs/mkdocs-machine.yml +ADD https://raw.githubusercontent.com/docker/machine/master/docs/index.md /docs/sources/machine/index.md + +# Docker Compose +ADD https://raw.githubusercontent.com/docker/fig/master/docs/mkdocs.yml /docs/mkdocs-compose.yml +ADD https://raw.githubusercontent.com/docker/fig/master/docs/index.md /docs/sources/compose/index.md +ADD https://raw.githubusercontent.com/docker/fig/master/docs/install.md /docs/sources/compose/install.md +ADD https://raw.githubusercontent.com/docker/fig/master/docs/cli.md /docs/sources/compose/cli.md +ADD https://raw.githubusercontent.com/docker/fig/master/docs/yml.md /docs/sources/compose/yml.md + +# Then build everything together, ready for mkdocs +RUN /docs/build.sh diff --git a/docs/mkdocs-compose.yml b/docs/mkdocs-compose.yml deleted file mode 100644 index e2738f328d..0000000000 --- a/docs/mkdocs-compose.yml +++ /dev/null @@ -1,5 +0,0 @@ - -- ['compose/userguide.md', 'User Guide', 'Docker Compose' ] -- ['compose/install.md', 'Installation', 'Docker Compose'] -- ['compose/cli.md', 'Reference', 'Compose command line'] -- ['compose/yml.md', 'Reference', 'Compose yml'] diff --git a/docs/mkdocs-machine.yml b/docs/mkdocs-machine.yml deleted file mode 100644 index 45b2c5c846..0000000000 --- a/docs/mkdocs-machine.yml +++ /dev/null @@ -1,2 +0,0 @@ - -- ['machine/userguide.md', 'User Guide', 'Docker Machine' ] diff --git a/docs/mkdocs-swarm.yml b/docs/mkdocs-swarm.yml deleted file mode 100644 index 5c9654f8f8..0000000000 --- a/docs/mkdocs-swarm.yml +++ /dev/null @@ -1,5 +0,0 @@ - -- ['swarm/README.md', 'User Guide', 'Docker Swarm' ] -- ['swarm/discovery.md', 'Reference', 'Swarm discovery'] -- ['swarm/API.md', 'Reference', 'Swarm API'] -- ['swarm/scheduler/filter.md', 'Reference', 'Swarm filters'] diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index c7d55288b7..1bd3b93fae 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -118,6 +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/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']