Skip to content

FATAL: could not create lock file “/var/run/postgresql/.s.PGSQL.5432.lock”: Permission denied #10

@honi

Description

@honi

I was running into that issue using this image without any custom Dockerfile.

$ boot2docker version
Client version: v1.1.2
Git commit: 429947b

$ docker version
Client version: 1.1.2
Client API version: 1.13
Go version (client): go1.2.1
Git commit (client): d84a070
Server version: 1.1.2
Server API version: 1.13
Go version (server): go1.2.1
Git commit (server): d84a070

I've managed to fix the issue with the following:

sed -ri "s/^#unix_socket_directories = .*$/unix_socket_directories = '\/tmp'/" "$PGDATA"/postgresql.conf

Though I had to use a custom docker-entrypoint.sh because at build time there is no postgresql.conf file.

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