mirror of https://github.com/docker/compose.git
Merge pull request #1774 from moxiegirl/test-entire-build
Contributors can build public docs with compose docs in context
(cherry picked from commit 487eae3b7b
)
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
parent
d456c3909d
commit
dfe9dccab8
|
@ -6,6 +6,14 @@ COPY . /src
|
||||||
|
|
||||||
COPY . /docs/content/compose/
|
COPY . /docs/content/compose/
|
||||||
|
|
||||||
|
RUN svn checkout https://github.com/docker/docker/trunk/docs /docs/content/docker
|
||||||
|
RUN svn checkout https://github.com/docker/swarm/trunk/docs /docs/content/swarm
|
||||||
|
RUN svn checkout https://github.com/docker/machine/trunk/docs /docs/content/machine
|
||||||
|
RUN svn checkout https://github.com/docker/distribution/trunk/docs /docs/content/registry
|
||||||
|
RUN svn checkout https://github.com/docker/tutorials/trunk/docs /docs/content/tutorials
|
||||||
|
RUN svn checkout https://github.com/docker/opensource/trunk/docs /docs/content
|
||||||
|
|
||||||
|
|
||||||
# Sed to process GitHub Markdown
|
# Sed to process GitHub Markdown
|
||||||
# 1-2 Remove comment code from metadata block
|
# 1-2 Remove comment code from metadata block
|
||||||
# 3 Change ](/word to ](/project/ in links
|
# 3 Change ](/word to ](/project/ in links
|
||||||
|
@ -15,10 +23,4 @@ COPY . /docs/content/compose/
|
||||||
# 7 Change ](../../ to ](/project/ --> not implemented
|
# 7 Change ](../../ to ](/project/ --> not implemented
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
RUN find /docs/content/compose -type f -name "*.md" -exec sed -i.old \
|
RUN /src/pre-process.sh /docs
|
||||||
-e '/^<!.*metadata]>/g' \
|
|
||||||
-e '/^<!.*end-metadata.*>/g' \
|
|
||||||
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/compose\//g' \
|
|
||||||
-e 's/\(\][(]\)\([A-z].*\)\(\.md\)/\1\/compose\/\2/g' \
|
|
||||||
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
|
||||||
-e 's/\(\][(]\)\(\.\.\/\)/\1\/compose\//g' {} \;
|
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
# Populate an array with just docker dirs and one with content dirs
|
||||||
|
docker_dir=(`ls -d /docs/content/docker/*`)
|
||||||
|
content_dir=(`ls -d /docs/content/*`)
|
||||||
|
|
||||||
|
# Loop content not of docker/
|
||||||
|
#
|
||||||
|
# Sed to process GitHub Markdown
|
||||||
|
# 1-2 Remove comment code from metadata block
|
||||||
|
# 3 Remove .md extension from link text
|
||||||
|
# 4 Change ](/ to ](/project/ in links
|
||||||
|
# 5 Change ](word) to ](/project/word)
|
||||||
|
# 6 Change ](../../ to ](/project/
|
||||||
|
# 7 Change ](../ to ](/project/word)
|
||||||
|
#
|
||||||
|
for i in "${content_dir[@]}"
|
||||||
|
do
|
||||||
|
:
|
||||||
|
case $i in
|
||||||
|
"/docs/content/windows")
|
||||||
|
;;
|
||||||
|
"/docs/content/mac")
|
||||||
|
;;
|
||||||
|
"/docs/content/linux")
|
||||||
|
;;
|
||||||
|
"/docs/content/docker")
|
||||||
|
y=${i##*/}
|
||||||
|
find $i -type f -name "*.md" -exec sed -i.old \
|
||||||
|
-e '/^<!.*metadata]>/g' \
|
||||||
|
-e '/^<!.*end-metadata.*>/g' {} \;
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
y=${i##*/}
|
||||||
|
find $i -type f -name "*.md" -exec sed -i.old \
|
||||||
|
-e '/^<!.*metadata]>/g' \
|
||||||
|
-e '/^<!.*end-metadata.*>/g' \
|
||||||
|
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/'$y'\//g' \
|
||||||
|
-e 's/\(\][(]\)\([A-z].*\)\(\.md\)/\1\/'$y'\/\2/g' \
|
||||||
|
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
||||||
|
-e 's/\(\][(]\)\(\.\/\)/\1\/'$y'\//g' \
|
||||||
|
-e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/'$y'\//g' \
|
||||||
|
-e 's/\(\][(]\)\(\.\.\/\)/\1\/'$y'\//g' {} \;
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# Move docker directories to content
|
||||||
|
#
|
||||||
|
for i in "${docker_dir[@]}"
|
||||||
|
do
|
||||||
|
:
|
||||||
|
if [ -d $i ]
|
||||||
|
then
|
||||||
|
mv $i /docs/content/
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf /docs/content/docker
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "build"
|
||||||
description = "build"
|
description = "build"
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, build"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, build"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="build.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "help"
|
||||||
description = "help"
|
description = "help"
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, help"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, help"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="help.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "kill"
|
||||||
description = "Forces running containers to stop."
|
description = "Forces running containers to stop."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, kill"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, kill"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="kill.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "logs"
|
||||||
description = "Displays log output from services."
|
description = "Displays log output from services."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, logs"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, logs"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="logs.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "port"
|
||||||
description = "Prints the public port for a port binding.s"
|
description = "Prints the public port for a port binding.s"
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, port"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, port"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="port.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "ps"
|
||||||
description = "Lists containers."
|
description = "Lists containers."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, ps"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, ps"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="ps.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "pull"
|
||||||
description = "Pulls service images."
|
description = "Pulls service images."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, pull"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, pull"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="pull.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "restart"
|
||||||
description = "Restarts Docker Compose services."
|
description = "Restarts Docker Compose services."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, restart"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, restart"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="restart.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "rm"
|
||||||
description = "Removes stopped service containers."
|
description = "Removes stopped service containers."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, rm"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, rm"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="rm.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "run"
|
||||||
description = "Runs a one-off command on a service."
|
description = "Runs a one-off command on a service."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, run"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, run"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="run.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "start"
|
||||||
description = "Starts existing containers for a service."
|
description = "Starts existing containers for a service."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, start"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, start"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="start.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "stop"
|
||||||
description = "Stops running containers without removing them. "
|
description = "Stops running containers without removing them. "
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, stop"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, stop"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="stop.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
|
@ -4,6 +4,7 @@ title = "up"
|
||||||
description = "Builds, (re)creates, starts, and attaches to containers for a service."
|
description = "Builds, (re)creates, starts, and attaches to containers for a service."
|
||||||
keywords = ["fig, composition, compose, docker, orchestration, cli, up"]
|
keywords = ["fig, composition, compose, docker, orchestration, cli, up"]
|
||||||
[menu.main]
|
[menu.main]
|
||||||
|
identifier="up.compose"
|
||||||
parent = "smn_compose_cli"
|
parent = "smn_compose_cli"
|
||||||
+++
|
+++
|
||||||
<![end-metadata]-->
|
<![end-metadata]-->
|
||||||
|
|
Loading…
Reference in New Issue