puppetlabs / pupperware

Container fun time lives here.
Other
183 stars 66 forks source link

Unable to start containers due to volume permission issue #139

Closed sambenj closed 5 years ago

sambenj commented 5 years ago

Describe the Bug

After cloning the repository and running docker-compose up, the puppet_1 and postgres_1 containers print the following permission errors, then exit

postgres_1 | chown: cannot read directory '/var/lib/postgresql/data': Permission denied puppet_1 | chown: cannot read directory '/etc/puppetlabs/puppet/': Permission denied puppet_1 | chown: cannot read directory '/opt/puppetlabs/server/data/puppetserver/': Permission denied

Expected Behavior

Containers to start successfully.

Steps to Reproduce

$ git clone https://github.com/puppetlabs/pupperware.git $ cd pupperware/ $ sudo docker-compose up

Environment

docker-compose version 1.22.0, build f46880f Docker version 1.13.1, build 47e2230/1.13.1 Fedora release 30 (Thirty) Linux 5.2.11-200.fc30.x86_64 #1 SMP Thu Aug 29 12:43:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Additional Context

Apologies if this is something trivial, this is my first play with containers.

sambenj commented 5 years ago

It was selinux.

chcon -Rt svirt_sandbox_file_t volumes