Skip to content

Commit

Permalink
Don't require Docker 1.5.0 for docker build -f docs/Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Dowideit <[email protected]>
  • Loading branch information
SvenDowideit committed Feb 26, 2015
1 parent 3e84b9e commit 8d4459f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ DOCKER_RUN_DOCKER := docker run --rm -it --privileged $(DOCKER_ENVS) $(DOCKER_MO

DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE

# for some docs workarounds (see below in "docs-build" target)
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)

default: binary

all: build
Expand Down Expand Up @@ -84,7 +87,11 @@ build: bundles

docs-build:
git fetch https://github.com/docker/docker.git docs && git diff --name-status FETCH_HEAD...HEAD -- docs > docs/changed-files
docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile .
cp ./VERSION docs/VERSION
echo "$(GIT_BRANCH)" > docs/GIT_BRANCH
# echo "$(AWS_S3_BUCKET)" > docs/AWS_S3_BUCKET
echo "$(GITCOMMIT)" > docs/GITCOMMIT
docker build -t "$(DOCKER_DOCS_IMAGE)" docs

bundles:
mkdir bundles
10 changes: 6 additions & 4 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ COPY . /src
RUN git reset --hard

# Then copy the desired docs into the /docs/sources/ dir
COPY ./docs/sources/ /docs/sources
COPY ./sources/ /docs/sources

COPY ./VERSION VERSION

COPY ./image/spec/v1.md /docs/sources/reference/image-spec-v1.md
# adding the image spec will require Docker 1.5 and `docker build -f docs/Dockerfile .`
#COPY ./image/spec/v1.md /docs/sources/reference/image-spec-v1.md

# TODO: don't do this - look at merging the yml file in build.sh
COPY ./docs/mkdocs.yml mkdocs.yml
COPY ./docs/s3_website.json s3_website.json
COPY ./mkdocs.yml mkdocs.yml
COPY ./s3_website.json s3_website.json

# Docker Swarm
ADD https://raw.githubusercontent.com/docker/swarm/master/docs/mkdocs.yml /docs/mkdocs-swarm.yml
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pages:
- ['reference/api/registry_api.md', 'Reference', 'Docker Registry API']
- ['reference/api/registry_api_client_libraries.md', 'Reference', 'Docker Registry API Client Libraries']
- ['reference/api/hub_registry_spec.md', 'Reference', 'Docker Hub and Registry Spec']
- ['reference/image-spec-v1.md', 'Reference', 'Docker Image Specification v1.0.0']
#- ['reference/image-spec-v1.md', 'Reference', 'Docker Image Specification v1.0.0']
- ['reference/api/docker_remote_api.md', 'Reference', 'Docker Remote API']
- ['reference/api/docker_remote_api_v1.18.md', 'Reference', 'Docker Remote API v1.18']
- ['reference/api/docker_remote_api_v1.17.md', 'Reference', 'Docker Remote API v1.17']
Expand Down

0 comments on commit 8d4459f

Please sign in to comment.