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__
|
||||
|
||||
# Compiled Documentation
|
||||
site/
|
||||
Makefile
|
||||
docs/_build
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
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
|
||||
COPY requirements.txt docs-requirements.txt ./
|
||||
RUN pip install -r requirements.txt -r docs-requirements.txt
|
||||
|
||||
COPY requirements.txt /src/requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY docs-requirements.txt /src/docs-requirements.txt
|
||||
RUN pip install -r docs-requirements.txt
|
||||
|
||||
COPY . /src
|
||||
USER sphinx
|
||||
|
|
4
Makefile
4
Makefile
|
@ -16,7 +16,7 @@ build-py3:
|
|||
|
||||
.PHONY: 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
|
||||
build-dind-certs:
|
||||
|
@ -77,7 +77,7 @@ flake8: build
|
|||
|
||||
.PHONY: 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
|
||||
shell: build
|
||||
|
|
Loading…
Reference in New Issue