fix(docker): support SELinux shared label, fixes #7196#7939
Merged
Conversation
|
Download the artifacts for this pull request:
See Testing a PR. |
rfay
approved these changes
Dec 12, 2025
Member
rfay
left a comment
There was a problem hiding this comment.
Works great, tested on same fedora with podman that was a complete failure before.
Should we show IsSELinux() in ddev version ? Probably (if on linux)
Member
Author
Good idea, I'll add it. |
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.
The Issue
How This PR Solves The Issue
Adds SELinux shared label "z" to service volumes in docker-compose https://docs.docker.com/engine/storage/bind-mounts/#configure-the-selinux-label
Adds "-selinux" suffix to docker platform in
ddev version.Manual Testing Instructions
Using Fedora, check for enabled SELinux:
With Docker and Fedora (
docker context use default):Configure Docker to use SELinux:
$ cat /etc/docker/daemon.json { "selinux-enabled": true }Restart the daemon
sudo systemctl restart dockerCheck for
docker info | grep -B5 selinux, should be hereCreate a directory, check permissions (
user_home_t):Run
cd my-project && ddev config --auto && ddev start- success!Check permissions (
container_file_t):With Podman and Fedora (
docker context use podman-rootless, see ddev/ddev.com#476):Check for
docker info | grep -B5 selinux, should be here by defaultCreate a directory, check permissions (
user_home_t):Run
cd my-project && ddev config --auto && ddev start- success!Check permissions (
container_file_t):Automated Testing Overview
Release/Deployment Notes