Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For docker-compose add a comment to include the :Z flag to avoid SELinux issues with running containers #323

Open
ggyaxxx opened this issue Feb 7, 2025 · 0 comments
Assignees

Comments

@ggyaxxx
Copy link

ggyaxxx commented Feb 7, 2025

Description

When running the Infinispan server via Docker on any SELinux-enabled system, the mounted configuration file is not accessible due to SELinux restrictions. This results in a Permission denied error.

Steps to Reproduce

  1. Use the following docker-compose.yaml:
    version: "3"
    services:
      infinispan-tracing:
        image: quay.io/infinispan/server:15.1
        volumes:
          - ./infinispan-tracing-configuration-server.yaml:/user-config/infinispan-tracing-configuration-server.yaml
    
  2. Run the docker-compose up command and notice the error
    java.io.FileNotFoundException: /user-config/infinispan-tracing-configuration-server.yaml (Permission denied)

Steps to Fix

Adding :Z to the volume declaration in docker-compose.yaml allows SELinux to label the file correctly:

volumes: - ./infinispan-tracing-configuration-server.yaml:/user-config/infinispan-tracing-configuration-server.yaml:Z

Because the :Z flag may cause errors on other systems though, simply adding a comment to the docker-compose file could save users a bit of time of troubleshooting.

@karesti karesti self-assigned this Feb 7, 2025
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

No branches or pull requests

2 participants