From d093cb03fb99383784c0b250d4be57d4ef80d0bf Mon Sep 17 00:00:00 2001 From: mawkone Date: Tue, 28 Apr 2026 13:50:11 -0700 Subject: [PATCH] fix(vibn-dev): delete default ubuntu user before creating vibn (uid 1000 collision on ubuntu:24.04) Made-with: Cursor --- vibn-dev/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vibn-dev/Dockerfile b/vibn-dev/Dockerfile index a2d5f7e..c4714d1 100644 --- a/vibn-dev/Dockerfile +++ b/vibn-dev/Dockerfile @@ -31,7 +31,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* # vibn user — the AI runs as this, NOT root. -RUN useradd --create-home --shell /bin/bash --uid 1000 vibn \ +# Ubuntu 24.04 base image preallocates a default `ubuntu` user at uid 1000; +# delete it first so we can claim 1000 for vibn (matches the docker exec +# `--user vibn` calls in lib/coolify-exec.ts and the workspace volume's +# default ownership in the compose template). +RUN userdel -r ubuntu 2>/dev/null || true \ + && useradd --create-home --shell /bin/bash --uid 1000 vibn \ && mkdir -p /workspace /home/vibn/.cache /home/vibn/.local /var/log/vibn-dev \ && chown -R vibn:vibn /workspace /home/vibn /var/log/vibn-dev \ && echo 'vibn ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vibn