Skip to content

Commit fdc7cf8

Browse files
committed
Change nebari user from UID 1001 to UID 1000
Replace the default ubuntu user (UID 1000) with the nebari user running as UID 1000 instead of 1001. This ensures compatibility with Kubernetes security contexts and volume permissions that expect UID 1000. Changes: - Delete ubuntu user (UID 1000) from base image - Create nebari user with UID 1000 (GID 100/users) - Maintains non-root security posture - Home directory: /home/nebari
1 parent 9fbf67d commit fdc7cf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ FROM ubuntu:24.04@${UBUNTU_DIGEST} AS builder
5151
COPY --from=pixi-installer /usr/local/bin/pixi /usr/local/bin/pixi
5252
COPY scripts /opt/scripts
5353

54-
RUN useradd -r -m -u 1001 -g 100 -s /bin/bash nebari && \
54+
RUN userdel -r ubuntu 2>/dev/null || true && \
55+
useradd -m -u 1000 -g 100 -s /bin/bash nebari && \
5556
mkdir -p /opt/envs && \
5657
chown -R nebari:users /home/nebari /opt/envs
5758

0 commit comments

Comments
 (0)