Skip to content

Commit 39b0516

Browse files
authored
Ensure correct SELinux labeling of container files on SELinux enabled systems. (#406)
While attempting to add a naive "Happy Eyeballs" option to test and experiment with, I encountered a "permission denied" error when running the Caddy container. To resolve this issue, this commit adds the :z mount option, which ensures SELinux compatibility by addressing the permission issues caused by SELinux when the Caddyfile is mounted without the appropriate label. It's important to note that this change should only affect systems with SELinux enabled.
1 parent 27eed68 commit 39b0516

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ services:
2424
# and we are not root in the gh action so cannot access them
2525
user: "${DOCKER_USER}"
2626
volumes:
27-
- "./caddy_storage:/caddy_storage"
28-
- "./Caddyfile:/etc/caddy/Caddyfile"
27+
# The :z mount option solves issues with SELinux.
28+
# See https://github.com/elixir-mint/mint/pull/406.
29+
- "./caddy_storage:/caddy_storage:z"
30+
- "./Caddyfile:/etc/caddy/Caddyfile:z"
2931
ports:
3032
- "8443:8443"

0 commit comments

Comments
 (0)