Merge pull request #311 from moxiegirl/doc-tooling-changes
doc: retooling to allow for docs build
This commit is contained in:
commit
0a2affa79f
1
AUTHORS
1
AUTHORS
@ -18,3 +18,4 @@ Shreyas Karnik <karnik.shreyas@gmail.com>
|
|||||||
Stephen J Day <stephen.day@docker.com>
|
Stephen J Day <stephen.day@docker.com>
|
||||||
Tianon Gravi <admwiggin@gmail.com>
|
Tianon Gravi <admwiggin@gmail.com>
|
||||||
xiekeyang <xiekeyang@huawei.com>
|
xiekeyang <xiekeyang@huawei.com>
|
||||||
|
Mary Anthony <mary.anthony@docker.com>
|
||||||
|
20
Makefile
20
Makefile
@ -2,7 +2,8 @@
|
|||||||
PREFIX?=$(shell pwd)
|
PREFIX?=$(shell pwd)
|
||||||
|
|
||||||
# Used to populate version variable in main package.
|
# Used to populate version variable in main package.
|
||||||
GO_LDFLAGS=-ldflags "-X `go list ./version`.Version `git describe --match 'v[0-9]*' --dirty='.m' --always`"
|
VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always)
|
||||||
|
GO_LDFLAGS=-ldflags "-X `go list ./version`.Version $(VERSION)"
|
||||||
|
|
||||||
.PHONY: clean all fmt vet lint build test binaries
|
.PHONY: clean all fmt vet lint build test binaries
|
||||||
.DEFAULT: default
|
.DEFAULT: default
|
||||||
@ -61,3 +62,20 @@ binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/registry-api-descriptor-template
|
|||||||
clean:
|
clean:
|
||||||
@echo "+ $@"
|
@echo "+ $@"
|
||||||
@rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/registry-api-descriptor-template"
|
@rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/registry-api-descriptor-template"
|
||||||
|
|
||||||
|
|
||||||
|
# Use the existing docs build cmds from docker/docker
|
||||||
|
# Later, we will move this into an import
|
||||||
|
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||||
|
DOCSPORT := 8000
|
||||||
|
DOCKER_DOCS_IMAGE := docker-docs-$(VERSION)
|
||||||
|
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
|
||||||
|
|
||||||
|
docs: docs-build
|
||||||
|
$(DOCKER_RUN_DOCS) -p $(DOCSPORT):8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
|
||||||
|
|
||||||
|
docs-shell: docs-build
|
||||||
|
$(DOCKER_RUN_DOCS) -p $(DOCSPORT):8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||||
|
|
||||||
|
docs-build:
|
||||||
|
docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile .
|
||||||
|
17
docs/Dockerfile
Normal file
17
docs/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
FROM docs/base:latest
|
||||||
|
MAINTAINER Mary <mary@docker.com> (@moxiegirl)
|
||||||
|
|
||||||
|
# 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 git describe --match 'v[0-9]*' --dirty='.m' --always > /docs/VERSION
|
||||||
|
COPY docs/* /docs/sources/distribution/
|
||||||
|
COPY docs/mkdocs.yml /docs/mkdocs-distribution.yml
|
||||||
|
|
||||||
|
# Then build everything together, ready for mkdocs
|
||||||
|
RUN /docs/build.sh
|
0
docs/install.md
Normal file
0
docs/install.md
Normal file
6
docs/mkdocs.yml
Normal file
6
docs/mkdocs.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
- ['distribution/overview.md', 'User Guide', 'Docker Distribution' ]
|
||||||
|
- ['distribution/install.md', 'Installation', 'Docker Distribution']
|
||||||
|
- ['distribution/architecture.md', 'Reference', 'Distribution Architecture']
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user