Skip to content

Error when mounting volume #17

@ehsueh

Description

@ehsueh

Hi again,

I'm experiencing an error when I try to mount a volume for the postgres db by changing the "volumes" section of docker-compose.yml for db to:

volumes: - /absolute/path/to/data/on/host:/var/lib/postgresql/data/:rw

When I try to run docker-compose up db I get:

db_1 | chmod: changing permissions of ‘/var/lib/postgresql/data/’: Operation not permitted

At first I thought maybe it's due to permission or configuration issues on my host machine, so I tried looking into selinux but with no success. When I created a simplified container building from erasche/chado:1.31-jenkins97-pg9.5, I was able to mount a host data directory on /foo and read and write smoothly through /foo to the directory on host. However, if I mount the same host data directory to the same container but on /var/lib/postgresql/data (instead of /foo), the build crashes. 😖

Do you know what might be the problem? What could I try to trace the problem further?

Thank you for your time. 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions