File tree Expand file tree Collapse file tree 6 files changed +21
-25
lines changed Expand file tree Collapse file tree 6 files changed +21
-25
lines changed Original file line number Diff line number Diff line change
1
+ build
Original file line number Diff line number Diff line change @@ -18,23 +18,22 @@ ENV PATH=$PATH:/home/app/.local/bin
18
18
19
19
WORKDIR /home/app/
20
20
21
- COPY index.py .
22
- COPY requirements.txt .
21
+ COPY --chown=app:app index.py .
22
+ COPY --chown=app:app requirements.txt .
23
23
USER root
24
24
RUN pip install -r requirements.txt
25
25
USER app
26
26
27
27
RUN mkdir -p function
28
28
RUN touch ./function/__init__.py
29
29
WORKDIR /home/app/function/
30
- COPY function/requirements.txt .
30
+ COPY --chown=app:app function/requirements.txt .
31
31
RUN pip install --user -r requirements.txt
32
32
33
33
WORKDIR /home/app/
34
34
35
35
USER root
36
- COPY function function
37
- RUN chown -R app:app ./
36
+ COPY --chown=app:app function function
38
37
USER app
39
38
40
39
ENV fprocess="python index.py"
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ ENV PATH=$PATH:/home/app/.local/bin
19
19
20
20
WORKDIR /home/app/
21
21
22
- COPY index.py .
23
- COPY requirements.txt .
22
+ COPY --chown=app:app index.py .
23
+ COPY --chown=app:app requirements.txt .
24
24
25
25
USER root
26
26
RUN pip install -r requirements.txt
@@ -31,14 +31,13 @@ USER app
31
31
RUN mkdir -p function
32
32
RUN touch ./function/__init__.py
33
33
WORKDIR /home/app/function/
34
- COPY function/requirements.txt .
34
+ COPY --chown=app:app function/requirements.txt .
35
35
RUN pip install --user -r requirements.txt
36
36
37
37
# install function code
38
38
USER root
39
39
40
- COPY function/ .
41
- RUN chown -R app:app ../
40
+ COPY --chown=app:app function/ .
42
41
43
42
ARG TEST_COMMAND=tox
44
43
ARG TEST_ENABLED=true
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ ENV PATH=$PATH:/home/app/.local/bin
19
19
20
20
WORKDIR /home/app/
21
21
22
- COPY index.py .
23
- COPY requirements.txt .
22
+ COPY --chown=app:app index.py .
23
+ COPY --chown=app:app requirements.txt .
24
24
25
25
USER root
26
26
RUN pip install -r requirements.txt
@@ -31,14 +31,13 @@ USER app
31
31
RUN mkdir -p function
32
32
RUN touch ./function/__init__.py
33
33
WORKDIR /home/app/function/
34
- COPY function/requirements.txt .
34
+ COPY --chown=app:app function/requirements.txt .
35
35
RUN pip install --user -r requirements.txt
36
36
37
37
# install function code
38
38
USER root
39
39
40
- COPY function/ .
41
- RUN chown -R app:app ../
40
+ COPY --chown=app:app function/ .
42
41
43
42
ARG TEST_COMMAND=tox
44
43
ARG TEST_ENABLED=true
Original file line number Diff line number Diff line change @@ -19,21 +19,20 @@ ENV PATH=$PATH:/home/app/.local/bin
19
19
20
20
WORKDIR /home/app/
21
21
22
- COPY index.py .
23
- COPY requirements.txt .
22
+ COPY --chown=app:app index.py .
23
+ COPY --chown=app:app requirements.txt .
24
24
USER root
25
25
RUN pip install -r requirements.txt
26
26
USER app
27
27
28
28
RUN mkdir -p function
29
29
RUN touch ./function/__init__.py
30
30
WORKDIR /home/app/function/
31
- COPY function/requirements.txt .
31
+ COPY --chown=app:app function/requirements.txt .
32
32
RUN pip install --user -r requirements.txt
33
33
34
34
USER root
35
- COPY function/ .
36
- RUN chown -R app:app ../
35
+ COPY --chown=app:app function/ .
37
36
38
37
ARG TEST_COMMAND=tox
39
38
ARG TEST_ENABLED=true
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ ENV PATH=$PATH:/home/app/.local/bin
19
19
20
20
WORKDIR /home/app/
21
21
22
- COPY index.py .
23
- COPY requirements.txt .
22
+ COPY --chown=app:app index.py .
23
+ COPY --chown=app:app requirements.txt .
24
24
USER root
25
25
RUN pip install -r requirements.txt
26
26
@@ -30,13 +30,12 @@ USER app
30
30
RUN mkdir -p function
31
31
RUN touch ./function/__init__.py
32
32
WORKDIR /home/app/function/
33
- COPY function/requirements.txt .
33
+ COPY --chown=app:app function/requirements.txt .
34
34
RUN pip install --user -r requirements.txt
35
35
36
36
# install function code
37
37
USER root
38
- COPY function/ .
39
- RUN chown -R app:app ../
38
+ COPY --chown=app:app function/ .
40
39
41
40
ARG TEST_COMMAND=tox
42
41
ARG TEST_ENABLED=true
You can’t perform that action at this time.
0 commit comments