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
1818
1919WORKDIR /home/app/
2020
21- COPY index.py .
22- COPY requirements.txt .
21+ COPY --chown=app:app index.py .
22+ COPY --chown=app:app requirements.txt .
2323USER root
2424RUN pip install -r requirements.txt
2525USER app
2626
2727RUN mkdir -p function
2828RUN touch ./function/__init__.py
2929WORKDIR /home/app/function/
30- COPY function/requirements.txt .
30+ COPY --chown=app:app function/requirements.txt .
3131RUN pip install --user -r requirements.txt
3232
3333WORKDIR /home/app/
3434
3535USER root
36- COPY function function
37- RUN chown -R app:app ./
36+ COPY --chown=app:app function function
3837USER app
3938
4039ENV 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
1919
2020WORKDIR /home/app/
2121
22- COPY index.py .
23- COPY requirements.txt .
22+ COPY --chown=app:app index.py .
23+ COPY --chown=app:app requirements.txt .
2424
2525USER root
2626RUN pip install -r requirements.txt
@@ -31,14 +31,13 @@ USER app
3131RUN mkdir -p function
3232RUN touch ./function/__init__.py
3333WORKDIR /home/app/function/
34- COPY function/requirements.txt .
34+ COPY --chown=app:app function/requirements.txt .
3535RUN pip install --user -r requirements.txt
3636
3737# install function code
3838USER root
3939
40- COPY function/ .
41- RUN chown -R app:app ../
40+ COPY --chown=app:app function/ .
4241
4342ARG TEST_COMMAND=tox
4443ARG TEST_ENABLED=true
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ ENV PATH=$PATH:/home/app/.local/bin
1919
2020WORKDIR /home/app/
2121
22- COPY index.py .
23- COPY requirements.txt .
22+ COPY --chown=app:app index.py .
23+ COPY --chown=app:app requirements.txt .
2424
2525USER root
2626RUN pip install -r requirements.txt
@@ -31,14 +31,13 @@ USER app
3131RUN mkdir -p function
3232RUN touch ./function/__init__.py
3333WORKDIR /home/app/function/
34- COPY function/requirements.txt .
34+ COPY --chown=app:app function/requirements.txt .
3535RUN pip install --user -r requirements.txt
3636
3737# install function code
3838USER root
3939
40- COPY function/ .
41- RUN chown -R app:app ../
40+ COPY --chown=app:app function/ .
4241
4342ARG TEST_COMMAND=tox
4443ARG TEST_ENABLED=true
Original file line number Diff line number Diff line change @@ -19,21 +19,20 @@ ENV PATH=$PATH:/home/app/.local/bin
1919
2020WORKDIR /home/app/
2121
22- COPY index.py .
23- COPY requirements.txt .
22+ COPY --chown=app:app index.py .
23+ COPY --chown=app:app requirements.txt .
2424USER root
2525RUN pip install -r requirements.txt
2626USER app
2727
2828RUN mkdir -p function
2929RUN touch ./function/__init__.py
3030WORKDIR /home/app/function/
31- COPY function/requirements.txt .
31+ COPY --chown=app:app function/requirements.txt .
3232RUN pip install --user -r requirements.txt
3333
3434USER root
35- COPY function/ .
36- RUN chown -R app:app ../
35+ COPY --chown=app:app function/ .
3736
3837ARG TEST_COMMAND=tox
3938ARG TEST_ENABLED=true
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ ENV PATH=$PATH:/home/app/.local/bin
1919
2020WORKDIR /home/app/
2121
22- COPY index.py .
23- COPY requirements.txt .
22+ COPY --chown=app:app index.py .
23+ COPY --chown=app:app requirements.txt .
2424USER root
2525RUN pip install -r requirements.txt
2626
@@ -30,13 +30,12 @@ USER app
3030RUN mkdir -p function
3131RUN touch ./function/__init__.py
3232WORKDIR /home/app/function/
33- COPY function/requirements.txt .
33+ COPY --chown=app:app function/requirements.txt .
3434RUN pip install --user -r requirements.txt
3535
3636# install function code
3737USER root
38- COPY function/ .
39- RUN chown -R app:app ../
38+ COPY --chown=app:app function/ .
4039
4140ARG TEST_COMMAND=tox
4241ARG TEST_ENABLED=true
You can’t perform that action at this time.
0 commit comments