Skip to content

Commit 025d9a9

Browse files
authored
image builder: give flytekit user ownership of /root after venv is created (#3298)
Signed-off-by: Niels Bantilan <[email protected]>
1 parent 001e3ab commit 025d9a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flytekit/image_spec/default_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@
108108
[ -f /etc/ssl/certs/ca-certificates.crt ] || \
109109
mkdir -p /etc/ssl/certs/ && cp /tmp/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
110110
111-
RUN id -u flytekit || useradd --create-home --shell /bin/bash flytekit
112-
RUN chown flytekit /root && chown -R flytekit /home
113-
114111
$INSTALL_PYTHON_TEMPLATE
115112
116113
# Configure user space
@@ -137,6 +134,9 @@
137134
RUN --mount=type=cache,sharing=locked,mode=0777,target=/root/.cache/uv,id=uv \
138135
--mount=from=uv,source=/uv,target=/usr/bin/uv $RUN_COMMANDS
139136
137+
RUN id -u flytekit || useradd --create-home --shell /bin/bash flytekit
138+
RUN chown -R flytekit /root && chown -R flytekit /home
139+
140140
WORKDIR /root
141141
SHELL ["/bin/bash", "-c"]
142142

0 commit comments

Comments
 (0)