moby/hooks/post_build
French Ben 5443f0152f docs: added support for CLI yaml file generation
Signed-off-by: French Ben <frenchben@docker.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-03-14 16:04:08 -07:00

19 lines
462 B
Bash
Executable file

#!/bin/bash
if [ -n "${BUILD_DOCS}" ]; then
set -e
DOCS_IMAGE=${DOCS_IMAGE:-${IMAGE_NAME}-docs}
docker run \
--entrypoint '' \
--privileged \
-e DOCKER_GITCOMMIT=$(git rev-parse --short HEAD) \
-v $(pwd)/docs/yaml/docs:/docs \
"${IMAGE_NAME}" \
sh -c 'hack/make.sh yaml-docs-generator && bundles/latest/yaml-docs-generator/yaml-docs-generator --target /docs'
(
cd docs/yaml
docker build -t ${DOCS_IMAGE} .
docker push ${DOCS_IMAGE}
)
fi