File tree Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Expand file tree Collapse file tree 3 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 13
13
__pycache__
14
14
15
15
# Compiled Documentation
16
- site /
17
- Makefile
16
+ docs /_build
Original file line number Diff line number Diff line change 1
1
FROM python:3.5
2
2
3
- RUN mkdir /src
4
- WORKDIR /src
3
+ ARG uid=1000
4
+ ARG gid=1000
5
5
6
- COPY requirements.txt /src/requirements.txt
7
- RUN pip install -r requirements.txt
6
+ RUN addgroup --gid $gid sphinx \
7
+ && useradd --uid $uid --gid $gid -M sphinx
8
8
9
- COPY docs-requirements.txt /src/docs-requirements.txt
10
- RUN pip install -r docs-requirements.txt
9
+ WORKDIR /src
10
+ COPY requirements.txt docs-requirements.txt ./
11
+ RUN pip install -r requirements.txt -r docs-requirements.txt
11
12
12
- COPY . /src
13
+ USER sphinx
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ build-py3:
16
16
17
17
.PHONY : build-docs
18
18
build-docs :
19
- docker build -t docker-sdk-python-docs -f Dockerfile-docs .
19
+ docker build -t docker-sdk-python-docs -f Dockerfile-docs --build-arg uid= $( shell id -u) --build-arg gid= $( shell id -g) .
20
20
21
21
.PHONY : build-dind-certs
22
22
build-dind-certs :
@@ -77,7 +77,7 @@ flake8: build
77
77
78
78
.PHONY : docs
79
79
docs : build-docs
80
- docker run --rm -it -v ` pwd` :/code docker-sdk-python-docs sphinx-build docs . /_build
80
+ docker run --rm -it -v ` pwd` :/src docker-sdk-python-docs sphinx-build docs docs /_build
81
81
82
82
.PHONY : shell
83
83
shell : build
You can’t perform that action at this time.
0 commit comments