fix(vibn-dev): delete default ubuntu user before creating vibn (uid 1000 collision on ubuntu:24.04)

Made-with: Cursor
This commit is contained in:
2026-04-28 13:50:11 -07:00
parent 3160fe2b56
commit d093cb03fb

View File

@@ -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