From 6b68c663df903a018ca1e5d16222317c953b24c9 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 16 Jul 2025 11:58:32 -0400 Subject: [PATCH] image builder: give flytekit user ownership of /root after venv is created Signed-off-by: Niels Bantilan --- flytekit/image_spec/default_builder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flytekit/image_spec/default_builder.py b/flytekit/image_spec/default_builder.py index e27d74464f..ac8256e862 100644 --- a/flytekit/image_spec/default_builder.py +++ b/flytekit/image_spec/default_builder.py @@ -108,9 +108,6 @@ [ -f /etc/ssl/certs/ca-certificates.crt ] || \ mkdir -p /etc/ssl/certs/ && cp /tmp/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -RUN id -u flytekit || useradd --create-home --shell /bin/bash flytekit -RUN chown flytekit /root && chown -R flytekit /home - $INSTALL_PYTHON_TEMPLATE # Configure user space @@ -137,6 +134,9 @@ RUN --mount=type=cache,sharing=locked,mode=0777,target=/root/.cache/uv,id=uv \ --mount=from=uv,source=/uv,target=/usr/bin/uv $RUN_COMMANDS +RUN id -u flytekit || useradd --create-home --shell /bin/bash flytekit +RUN chown -R flytekit /root && chown -R flytekit /home + WORKDIR /root SHELL ["/bin/bash", "-c"]