8000 Change ownership of /var/run/postgresql on startup · Issue #50 · docker-library/postgres · GitHub
[go: up one dir, main page]

Skip to content
Change ownership of /var/run/postgresql on startup #50
Closed
@bartmeuris

Description

@bartmeuris

Currently, the init script changes the ownership of /var/lib/postgresql/data to make sure the postgres user can write to it's data directory.

However, when starting a postgres container, I use a data volume that shares both /var/lib/postgresql/data for storing the data, and /var/run/postgresql for storing the postgres sockets - so I don't have to use networking. The containers that need access to postgres are started with mounting my data volume and accessing (what they think is) the local unix socket. This way can easily give another container access to my postgres database without network discovery or network overhead, eliminating a lot of potential problems and improving security.

The problem however is that when you create a volume like this, I have to launch a temporary container to fix the permissions of /var/run/postgresql before launching my postgres server.

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

      0