简体   繁体   中英

docker-compose docker-entrypoint-initdb.d Permission denied

I am trying to run the puppet pupperware suite (all 3 servers/puppet server/puppet DB/DB server).

I am using the official Yaml file provided by puppetlabs for docker compose: https://github.com/puppetlabs/pupperware/blob/master/docker-compose.yml

When I run that Yaml file in docker compose however, I am running into the following error (from docker-compose logs):

postgres_1  | ls: cannot open directory '/docker-entrypoint-initdb.d/': Permission denied

And as a result, the build fails (only the puppet server comes up, but not the other ones).

My docker host is a Fedora 33 virtual machine running inside a Proxmox environment. Proxmox runs on the physical host.

I have disabled SELinux, and I am running docker (moby) rootless. My local user (uid 1000) can run docker without sudo.

I believe I need to set permission in the container (probably via a Dockerfile) but I am not sure how to change that and I am not sure how to use a Dockerfile and docker-compose simultaneously.

thank you for your help

The docker-compose file is from the Puppet 6 era. The docker images that the Pupperware setup currently pulls, are latest, which is Puppet 7.

I got my pre-existing setup functioning again by changing the image names to:

puppet/puppetserver:6.14.1
postgres:9.6
puppet/puppetdb:6.13.1

Maybe this works for you as well.

well, since it's been a month and you have no answers I will tell try to help you with what I know.

You should put a Dockerfile in the root of your project. It contains commands to be run by the docker daemon AND the commands run by the linux inside the container. Then it runs through the contents of your docker-compose.yml and runs the commands in there. So to solve the permission problem you should add RUN, which executes the linux command in Bash and add data to the folder.

Also look at this answer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM