Kaydet (Commit) 6529fa59 authored tarafından Frank Sachsenheim's avatar Frank Sachsenheim

Makes docs builds faster and ensures proper ownership

Signed-off-by: 's avatarFrank Sachsenheim <funkyfuture@riseup.net>
üst f127a9ff
......@@ -13,5 +13,4 @@ html/*
__pycache__
# Compiled Documentation
site/
Makefile
docs/_build
FROM python:3.5
RUN mkdir /src
WORKDIR /src
ARG uid=1000
ARG gid=1000
COPY requirements.txt /src/requirements.txt
RUN pip install -r requirements.txt
RUN addgroup --gid $gid sphinx \
&& useradd --uid $uid --gid $gid -M sphinx
COPY docs-requirements.txt /src/docs-requirements.txt
RUN pip install -r docs-requirements.txt
WORKDIR /src
COPY requirements.txt docs-requirements.txt ./
RUN pip install -r requirements.txt -r docs-requirements.txt
COPY . /src
USER sphinx
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment