Merge pull request #566 from SvenDowideit/add-docker-docs-scafolding

Add the docs.docker.com build tooling
This commit is contained in:
Evan Hazlett 2015-02-20 15:17:46 -08:00
commit 20ffc488f0
3 changed files with 33 additions and 0 deletions

View File

@ -15,3 +15,19 @@ validate: validate-dco validate-gofmt
build:
script/build
# import the existing docs build cmds from docker/docker
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
DOCSPORT := 8000
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
DOCKER_DOCS_IMAGE := dhe-docs$(if $(GIT_BRANCH),:$(GIT_BRANCH))
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
docs: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
docs-shell: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
docs-build:
docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile .

15
docs/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM docs/base:latest
MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
# to get the git info for this repo
COPY . /src
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
RUN git reset --hard
RUN grep VERSION /src/version.go | sed 's/.*"\(.*\)".*/\1/' > /docs/VERSION
COPY docs/* /docs/sources/machine/
COPY docs/mkdocs.yml /docs/mkdocs-machine.yml
# Then build everything together, ready for mkdocs
RUN /docs/build.sh

2
docs/mkdocs.yml Normal file
View File

@ -0,0 +1,2 @@
- ['machine/dockermachine.md', 'User Guide', 'Docker Machine' ]