Repository navigation
docs: run docker compose exec as the app user #2058 - #308
Closed
Evgeniy-DB wants to merge 1 commit into
Closed
Evgeniy-DB wants to merge 1 commit into
Evgeniy-DB wants to merge 1 commit into
Conversation
`docker compose exec` bypasses bin/docker-entrypoint and runs as the image user, which is root: the entrypoint needs root to align the app uid with the bind-mount owner, chown the cache volumes and open up the Docker socket before dropping to `app` with su-exec. On Linux the `.:/app` bind-mount keeps real uids, so every command run this way — including the `make check_all` the docs prescribe — leaves root-owned files in tmp/ and log/ (bootsnap cache, vite test build, the test lock). The dev processes, running as `app`, then hit EACCES on them. The usual workaround, `sudo rm -rf tmp/`, also deletes the tracked tmp/pids/.keep, and Puma, which writes its pidfile without creating the directory, crashes on the next `make up` with `ENOENT: tmp/pids/mcp.pid`. macOS is unaffected (Docker Desktop does not propagate ownership), and `-u app` works there too. Existing Linux checkouts with root-owned files need a one-time `sudo chown -R "$(id -u):$(id -g)" tmp log storage`. Signed-off-by: Evgeniy Yagnenkov <[email protected]>
5 of 8 tasks
artempartos
added a commit
that referenced
this pull request
Sep 24, 2026
* fix(docker): run the dev stack as the host user instead of root `docker compose exec` bypasses the entrypoint and ran as root, the image user. On Linux that left root-owned files in tmp/ and log/, the app user hit EACCES on them, and the `sudo rm -rf tmp` workaround deleted tmp/pids/.keep, so Puma crashed on its pidfile (#298, #308). web and worker now run as UID:GID, which the Makefile exports, so every process, including exec, writes files the host user owns. The caches move from named volumes, which are created root-owned, to bind-mounted .docker-cache/ directories. The entrypoint's root section (uid remap, chown, socket chgrp) is gone; worker reaches the Docker socket through group_add. CI and production keep bin/run-as-app unchanged in behaviour. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]> * fix(vite): keep tsconfig-paths out of the dev gem cache The plugin crawls the whole checkout for tsconfig files. With the gems now installed under .docker-cache/, it parsed a generator template shipped by inertia_rails and logged a parse error on every build. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]> --------- Signed-off-by: Artem Petrov <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
…ay out the Coder services (#308) Signed-off-by: Alex <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
…code (#308) Signed-off-by: Alex <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
* docs(runners): design the layers and the adapter boundary (#308) Signed-off-by: Alex <[email protected]> * docs(runners): group the core by area, specify transactions and IO, lay out the Coder services (#308) Signed-off-by: Alex <[email protected]> * docs(runners): bring the layers design in line with the reworked 17c code (#308) Signed-off-by: Alex <[email protected]> --------- Signed-off-by: Alex <[email protected]> Co-authored-by: Alex <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker compose execbypasses bin/docker-entrypoint and runs as the image user, which is root: the entrypoint needs root to align the app uid with the bind-mount owner, chown the cache volumes and open up the Docker socket before dropping toappwith su-exec. On Linux the.:/appbind-mount keeps real uids, so every command run this way — including themake check_allthe docs prescribe — leaves root-owned files in tmp/ and log/ (bootsnap cache, vite test build, the test lock). The dev processes, running asapp, then hit EACCES on them. The usual workaround,sudo rm -rf tmp/, also deletes the tracked tmp/pids/.keep, and Puma, which writes its pidfile without creating the directory, crashes on the nextmake upwithENOENT: tmp/pids/mcp.pid.macOS is unaffected (Docker Desktop does not propagate ownership), and
-u appworks there too.Existing Linux checkouts with root-owned files need a one-time
sudo chown -R "$(id -u):$(id -g)" tmp log storage.Related issues
Type of change
How was this tested?
Checklist
git commit -s).organization has executed the Corporate CLA.
make check_allpasses locally (tests, rubocop, brakeman, eslint, typescript).