mirror of https://github.com/docker/docker-py.git
Makes docs builds faster and ensures proper ownership
Signed-off-by: Frank Sachsenheim <funkyfuture@riseup.net>
This commit is contained in:
parent
f127a9ffdc
commit
6529fa599c
|
|
@ -13,5 +13,4 @@ html/*
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
# Compiled Documentation
|
# Compiled Documentation
|
||||||
site/
|
docs/_build
|
||||||
Makefile
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
FROM python:3.5
|
FROM python:3.5
|
||||||
|
|
||||||
RUN mkdir /src
|
ARG uid=1000
|
||||||
|
ARG gid=1000
|
||||||
|
|
||||||
|
RUN addgroup --gid $gid sphinx \
|
||||||
|
&& useradd --uid $uid --gid $gid -M sphinx
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
COPY requirements.txt docs-requirements.txt ./
|
||||||
|
RUN pip install -r requirements.txt -r docs-requirements.txt
|
||||||
|
|
||||||
COPY requirements.txt /src/requirements.txt
|
USER sphinx
|
||||||
RUN pip install -r requirements.txt
|
|
||||||
|
|
||||||
COPY docs-requirements.txt /src/docs-requirements.txt
|
|
||||||
RUN pip install -r docs-requirements.txt
|
|
||||||
|
|
||||||
COPY . /src
|
|
||||||
|
|
|
||||||
4
Makefile
4
Makefile
|
|
@ -16,7 +16,7 @@ build-py3:
|
||||||
|
|
||||||
.PHONY: build-docs
|
.PHONY: build-docs
|
||||||
build-docs:
|
build-docs:
|
||||||
docker build -t docker-sdk-python-docs -f Dockerfile-docs .
|
docker build -t docker-sdk-python-docs -f Dockerfile-docs --build-arg uid=$(shell id -u) --build-arg gid=$(shell id -g) .
|
||||||
|
|
||||||
.PHONY: build-dind-certs
|
.PHONY: build-dind-certs
|
||||||
build-dind-certs:
|
build-dind-certs:
|
||||||
|
|
@ -77,7 +77,7 @@ flake8: build
|
||||||
|
|
||||||
.PHONY: docs
|
.PHONY: docs
|
||||||
docs: build-docs
|
docs: build-docs
|
||||||
docker run --rm -it -v `pwd`:/code docker-sdk-python-docs sphinx-build docs ./_build
|
docker run --rm -it -v `pwd`:/src docker-sdk-python-docs sphinx-build docs docs/_build
|
||||||
|
|
||||||
.PHONY: shell
|
.PHONY: shell
|
||||||
shell: build
|
shell: build
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue