Update docker image definitions for compatibility with taskgraph 10.x
The newer image_builder creates directories listed as volumes before running any other commands.
This commit is contained in:
Родитель
eefe21f0fa
Коммит
5d72e2267f
|
@ -4,9 +4,12 @@
|
|||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
VOLUME /builds/worker/checkouts
|
||||
VOLUME /builds/worker/.cache
|
||||
|
||||
# Add worker user
|
||||
|
||||
RUN mkdir /builds && \
|
||||
RUN mkdir -p /builds && \
|
||||
useradd -d /builds/worker -s /bin/bash -m worker && \
|
||||
chown worker:worker /builds/worker && \
|
||||
mkdir /builds/worker/artifacts && \
|
||||
|
@ -175,9 +178,6 @@ ENV SHELL=/bin/bash \
|
|||
HOME=/builds/worker \
|
||||
PATH=/builds/worker/.local/bin:$PATH
|
||||
|
||||
VOLUME /builds/worker/checkouts
|
||||
VOLUME /builds/worker/.cache
|
||||
|
||||
# Switch to the worker user to install rustup
|
||||
# After startup, run-task will downgrade it's permissions to be this user
|
||||
USER worker
|
||||
|
|
|
@ -8,9 +8,12 @@
|
|||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
VOLUME /builds/worker/checkouts
|
||||
VOLUME /builds/worker/.cache
|
||||
|
||||
# Add worker user
|
||||
|
||||
RUN mkdir /builds && \
|
||||
RUN mkdir -p /builds && \
|
||||
useradd -d /builds/worker -s /bin/bash -m worker && \
|
||||
chown worker:worker /builds/worker && \
|
||||
mkdir /builds/worker/artifacts && \
|
||||
|
@ -83,8 +86,5 @@ ENV SHELL=/bin/bash \
|
|||
HOME=/builds/worker \
|
||||
PATH=/builds/worker/.local/bin:$PATH
|
||||
|
||||
VOLUME /builds/worker/checkouts
|
||||
VOLUME /builds/worker/.cache
|
||||
|
||||
# run-task needs to run as root (after initialization, it changes to `worker`)
|
||||
USER root
|
||||
|
|
Загрузка…
Ссылка в новой задаче