File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed
Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,19 @@ validate: validate-dco validate-gofmt
1515
1616build :
1717 script/build
18+
19+ # import the existing docs build cmds from docker/docker
20+ DOCS_MOUNT := $(if $(DOCSDIR ) ,-v $(CURDIR ) /$(DOCSDIR ) :/$(DOCSDIR ) )
21+ DOCSPORT := 8000
22+ GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
23+ DOCKER_DOCS_IMAGE := dhe-docs$(if $(GIT_BRANCH ) ,:$(GIT_BRANCH ) )
24+ DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT ) -e AWS_S3_BUCKET -e NOCACHE
25+
26+ docs : docs-build
27+ $(DOCKER_RUN_DOCS ) -p $(if $(DOCSPORT ) ,$(DOCSPORT ) :) 8000 " $( DOCKER_DOCS_IMAGE) " mkdocs serve
28+
29+ docs-shell : docs-build
30+ $(DOCKER_RUN_DOCS ) -p $(if $(DOCSPORT ) ,$(DOCSPORT ) :) 8000 " $( DOCKER_DOCS_IMAGE) " bash
31+
32+ docs-build :
33+ docker build -t " $( DOCKER_DOCS_IMAGE) " -f docs/Dockerfile .
Original file line number Diff line number Diff line change 1+ FROM docs/base:latest
2+ MAINTAINER Sven Dowideit <SvenDowideit@docker.com> (@SvenDowideit)
3+
4+ # to get the git info for this repo
5+ COPY . /src
6+
7+ # Reset the /docs dir so we can replace the theme meta with the new repo's git info
8+ RUN git reset --hard
9+
10+ RUN grep VERSION /src/version.go | sed 's/.*"\( .*\) ".*/\1 /' > /docs/VERSION
11+ COPY docs/* /docs/sources/machine/
12+ COPY docs/mkdocs.yml /docs/mkdocs-machine.yml
13+
14+ # Then build everything together, ready for mkdocs
15+ RUN /docs/build.sh
Original file line number Diff line number Diff line change 1+
2+ - ['machine/dockermachine.md', 'User Guide', 'Docker Machine' ]
You can’t perform that action at this time.
0 commit comments