forked from docker-archive/classicswarm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ./script/doc to build swarm documentation using the docs.docker.c…
…om tooling Signed-off-by: Sven Dowideit <[email protected]>
- Loading branch information
1 parent
2f23f98
commit 11b2121
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM docs/base:latest | ||
MAINTAINER Sven Dowideit <[email protected]> (@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/version.go | sed 's/.*"\(.*\)".*/\1/' > /docs/VERSION | ||
COPY docs/mkdocs.yml /docs/mkdocs-swarm.yml | ||
|
||
COPY ./scheduler/strategy/README.md /docs/sources/swarm/scheduler/strategy.md | ||
COPY ./scheduler/filter/README.md /docs/sources/swarm/scheduler/filter.md | ||
COPY ./api/README.md /docs/sources/swarm/API.md | ||
COPY ./discovery/README.md /docs/sources/swarm/discovery.md | ||
#COPY ./discovery/token/README.md /docs/sources/ | ||
COPY ./docs/index.md /docs/sources/swarm/index.md | ||
|
||
# Then build everything together, ready for mkdocs | ||
RUN /docs/build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
set -ex | ||
|
||
# import the existing docs build cmds from docker/docker | ||
DOCSPORT=8000 | ||
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) | ||
DOCKER_DOCS_IMAGE="compose-docs$GIT_BRANCH" | ||
DOCKER_RUN_DOCS="docker run --rm -it -e NOCACHE" | ||
|
||
docker build -t "$DOCKER_DOCS_IMAGE" -f docs/Dockerfile . | ||
$DOCKER_RUN_DOCS -p $DOCSPORT:8000 "$DOCKER_DOCS_IMAGE" mkdocs serve |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
- ['swarm/index.md', 'User Guide', 'Docker Swarm' ] | ||
- ['swarm/discovery.md', 'Reference', 'Swarm discovery'] | ||
- ['swarm/API.md', 'Reference', 'Swarm API'] | ||
- ['swarm/scheduler/filter.md', 'Reference', 'Swarm filters'] | ||
- ['swarm/scheduler/strategy.md', 'Reference', 'Swarm strategies'] |