Skip to content

Match container user ids to checkout owner - #54

Open
Jbsco wants to merge 1 commit into
lasp:mainfrom
Jbsco:container-user-ids
Open

Jbsco wants to merge 1 commit into
lasp:mainfrom
Jbsco:container-user-ids

Conversation

@Jbsco

@Jbsco Jbsco commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

This image creates user as uid 1001. On a Linux host running Docker Engine, container ids are host ids, so for a host user with other ids, files written by the container on bind mounts belong to 1001. Adamant's activation also re-owns mounted repositories to 1001, and host git then refuses them.

New docker/entrypoint.sh gives user the uid and gid of whoever owns the mounted checkout, then runs the command as user. It first removes any other image account or group with those ids, since Ubuntu's own account has 1000. This needs root, so the compose file starts the container as root, and adamant_env.sh start now runs its first activation with -u user. A healthcheck reports ready once the ids are set, and start waits for it with up --wait.

On Docker Desktop, a checkout reads as root's inside the container, so nothing changes there. GitHub workflows run the image directly, without the compose file, so CI is unaffected.

@Jbsco
Jbsco requested a review from dinkelk November 6, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant