-
Notifications
You must be signed in to change notification settings - Fork 576
db container fails to start with chmod error #24
Comments
Hmm.. postgres 9.5 is known to have the bug: docker-library/postgres#116 Did you modify the db Dockerfile to use postgres 9.5 instead of 9.4? |
Nope. I used the 4 line instructions from the docs (clone, link nossl config, compose up -d) and it failed with an error message saying it couldn't link the app container to the db container. So I tried the command I described in the OP to see what was failing in the db container. |
Would you please delete "- ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data" in your docker-compose.yml and run the container again? |
That worked. |
Although, now I have a separate issue, the app container shuts down after a minute:
|
I think you have problems of volume mounting. The error in app container also looks a volume problem because the container load config file from a volume. Deleting all volume sections in docker-compose.yml may be a workaround but it is not a good long-term solution because you will lost all of data when the containers are removed. Are you using selinux? Then you may try this solution. |
I'm not knowingly using selinux. Is it enabled by default in Centos 7? |
I think so. I have used CentOS 4, 5, 6 and 7 and selinux was enabled in all of them. You may find the configuration in /etc/selinux/config or /etc/sysconfig/selinux. |
Okay, so after restoring the the postgresql/data volume in docker-compose.yml, I ran the following command: sudo chcon --recursive --type=svirt_sandbox_file_t --range=s0 ./volumes/db/var/lib/postgresql/data And then the db container was able to come up. |
Similarly, I had to run the same chcon command for the |
Running on Centos 7 with:
Docker:
And docker-compose:
The text was updated successfully, but these errors were encountered: