Skip to content

Commit 358a723

Browse files
committed
Improve source copy/ownership in Dockerfile
1 parent 042894c commit 358a723

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

master/Dockerfile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,13 @@ RUN apt-get update \
2222
RUN useradd --create-home --home-dir /buildbot buildbot
2323

2424
# Copy virtual environment from builder
25-
COPY --from=builder /buildbot/.venv /buildbot/.venv
25+
COPY --from=builder --chown=buildbot:buildbot /buildbot/.venv /buildbot/.venv
2626
ENV PATH="/buildbot/.venv/bin:$PATH" \
2727
VIRTUAL_ENV="/buildbot/.venv"
2828

29-
# Copy master source files
30-
COPY master/master.cfg \
31-
master/custom_steps.py \
32-
master/buildbot.tac \
33-
master/toolchain.linux-arm32.cmake \
34-
/buildbot/master/
35-
36-
COPY master.sh /buildbot/master.sh
37-
RUN chmod +x /buildbot/master.sh
38-
39-
# Ensure buildbot owns its home directory
40-
RUN chown -R buildbot:buildbot /buildbot
29+
# Copy source files
30+
COPY --chown=buildbot:buildbot master/ master/
31+
COPY --chown=buildbot:buildbot master.sh master.sh
4132

4233
USER buildbot
4334
WORKDIR /buildbot

0 commit comments

Comments
 (0)