Skip to content

Commit d6f27d7

Browse files
authored
Merge pull request kivy#1652 from AndreMiras/feature/speedup_docker_chown
Speed up Docker chown via COPY parameter
2 parents f58e5ec + 093b206 commit d6f27d7

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Dockerfile.py2

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,8 @@ RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
119119
RUN pip install --upgrade cython==0.28.6
120120

121121
WORKDIR ${WORK_DIR}
122-
COPY . ${WORK_DIR}
123-
124-
# user needs ownership/write access to these directories
125-
RUN chown --recursive ${USER} ${WORK_DIR} ${ANDROID_SDK_HOME}
122+
COPY --chown=user:user . ${WORK_DIR}
123+
RUN chown --recursive ${USER} ${ANDROID_SDK_HOME}
126124
USER ${USER}
127125

128126
# install python-for-android from current branch

Dockerfile.py3

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,8 @@ RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
119119
RUN pip3 install --upgrade cython==0.28.6
120120

121121
WORKDIR ${WORK_DIR}
122-
COPY . ${WORK_DIR}
123-
124-
# user needs ownership/write access to these directories
125-
RUN chown --recursive ${USER} ${WORK_DIR} ${ANDROID_SDK_HOME}
122+
COPY --chown=user:user . ${WORK_DIR}
123+
RUN chown --recursive ${USER} ${ANDROID_SDK_HOME}
126124
USER ${USER}
127125

128126
# install python-for-android from current branch

0 commit comments

Comments
 (0)