Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
| ... | ... |
@@ -1,4 +1,4 @@ |
| 1 |
-.PHONY: all binary build cross default docs shell test |
|
| 1 |
+.PHONY: all binary build cross default docs docs-build docs-shell shell test |
|
| 2 | 2 |
|
| 3 | 3 |
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) |
| 4 | 4 |
DOCKER_IMAGE := docker:$(GIT_BRANCH) |
| ... | ... |
@@ -16,10 +16,12 @@ binary: build |
| 16 | 16 |
cross: build |
| 17 | 17 |
$(DOCKER_RUN_DOCKER) hack/make.sh binary cross |
| 18 | 18 |
|
| 19 |
-docs: |
|
| 20 |
- docker build -rm -t "$(DOCKER_DOCS_IMAGE)" docs |
|
| 19 |
+docs: docs-build |
|
| 21 | 20 |
docker run -rm -i -t -p 8000:8000 "$(DOCKER_DOCS_IMAGE)" |
| 22 | 21 |
|
| 22 |
+docs-shell: docs-build |
|
| 23 |
+ docker run -rm -i -t -p 8000:8000 "$(DOCKER_DOCS_IMAGE)" bash |
|
| 24 |
+ |
|
| 23 | 25 |
test: build |
| 24 | 26 |
$(DOCKER_RUN_DOCKER) hack/make.sh test test-integration |
| 25 | 27 |
|
| ... | ... |
@@ -29,5 +31,8 @@ shell: build |
| 29 | 29 |
build: bundles |
| 30 | 30 |
docker build -rm -t "$(DOCKER_IMAGE)" . |
| 31 | 31 |
|
| 32 |
+docs-build: |
|
| 33 |
+ docker build -rm -t "$(DOCKER_DOCS_IMAGE)" docs |
|
| 34 |
+ |
|
| 32 | 35 |
bundles: |
| 33 | 36 |
mkdir bundles |
| ... | ... |
@@ -1,20 +1,19 @@ |
| 1 |
-from ubuntu:12.04 |
|
| 2 |
-maintainer Nick Stinemates |
|
| 1 |
+FROM stackbrew/ubuntu:12.04 |
|
| 2 |
+MAINTAINER Nick Stinemates |
|
| 3 | 3 |
# |
| 4 | 4 |
# docker build -t docker:docs . && docker run -p 8000:8000 docker:docs |
| 5 | 5 |
# |
| 6 | 6 |
|
| 7 |
-run apt-get update |
|
| 8 |
-run apt-get install -y python-setuptools make |
|
| 9 |
-run easy_install pip |
|
| 10 |
-#from docs/requirements.txt, but here to increase cacheability |
|
| 11 |
-run pip install --no-use-wheel Sphinx==1.1.3 |
|
| 12 |
-run pip install --no-use-wheel sphinxcontrib-httpdomain==1.1.9 |
|
| 13 |
-add . /docs |
|
| 14 |
-run cd /docs; make docs |
|
| 7 |
+# TODO switch to http://packages.ubuntu.com/trusty/python-sphinxcontrib-httpdomain once trusty is released |
|
| 15 | 8 |
|
| 16 |
-expose 8000 |
|
| 9 |
+RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq make python-pip python-setuptools |
|
| 10 |
+# pip installs from docs/requirements.txt, but here to increase cacheability |
|
| 11 |
+RUN pip install Sphinx==1.1.3 |
|
| 12 |
+RUN pip install sphinxcontrib-httpdomain==1.1.9 |
|
| 13 |
+ADD . /docs |
|
| 14 |
+RUN make -C /docs clean docs |
|
| 17 | 15 |
|
| 18 |
-workdir /docs/_build/html |
|
| 19 |
- |
|
| 20 |
-entrypoint ["python", "-m", "SimpleHTTPServer"] |
|
| 16 |
+WORKDIR /docs/_build/html |
|
| 17 |
+CMD ["python", "-m", "SimpleHTTPServer"] |
|
| 18 |
+# note, EXPOSE is only last because of https://github.com/dotcloud/docker/issues/3525 |
|
| 19 |
+EXPOSE 8000 |