Trying to start a PostgreSQL container according to the instructions at https://hub.docker.com/_/postgres (How to use this image → start a postgres instance),
docker run -e POSTGRES_PASSWORD=mysecretpassword postgres:14
gives the following error:
ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted
The only change was removing the --name
and -d
parameter while using the version tag 14
of PostgreSQL. But even with the exact same command from Docker Hub the same error shows up.
Why is that and how can it be fixed? Is it a bug in the PostgreSQL image or a system configuration issue?
Additional information:
$ docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:10:45 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:09:19 2017
OS/Arch: linux/amd64
Experimental: false
$ uname -r
5.13.0-16-generic
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION="Ubuntu 21.10"
$ docker images postgres:latest
REPOSITORY TAG IMAGE ID CREATED SIZE
postgres latest 14e58c3f6369 6 days ago 374MB
$ docker images postgres:14
REPOSITORY TAG IMAGE ID CREATED SIZE
postgres 14 14e58c3f6369 6 days ago 374MB
It looks like it works with postgres:14-alpine
.