-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tasks: Bind the host's podman API socket
This paves the way for spawning per-job tasks containers from the container (via `job-runner`). Getting the permissions right is unfortunately annoyingly complicated, as the host's socket has 660 permissions, but the tasks container runs as uid 1111. Ideally we could use something like -v "${XDG_RUNTIME_DIR:-/run}/podman/podman.sock:/podman.sock:idmap=gids=$(id -g)-1111-1" but that fails with "invalid mappings", and is generally not well documented. `--mount=type=bind,[...],idmap --uidmap [...]` does not work either. So resort to file permissions for the host's `podman.sock`: - For local developers in `run-local.sh`, add an ACL for user 1111. This does not hurt too much for a human developer: The socket itself may be accessible to uid 1111 (which *might* be an untrusted local user), but its directory (/run/user/uid) is not. - This works fine locally, but for some yet unexplained reason not in GitHub workflows. For now just hack the permissions to 666 there, we really don't care. - For production, `setfacl` (i.e. the `acl` package) is unfortunately not installed in Fedora IoT/CoreOS. Just set the group to `1111` there. That doesn't matter much, the secrets are all already chmod'ed to the container user, and these machines don't do anything else.
- Loading branch information
1 parent
c118069
commit e6091cd
Showing
3 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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