Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

376
Visualizações
Cannot start PostgreSQL Docker container – "'/docker-entrypoint-initdb.d/': Operation not permitted"

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.

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

I bumped into the same issue.

PostgreSQL Docker tags 13 and 14 seem to be using Debian's bulleye which seems to change things in regards to the file system.

At the moment there are two solutions:

  1. Downgrade to PostgreSQL 13-buster, i.e. Docker tag postgres:13.4-buster, as it seems 14 does not have a -buster equivalent.
  2. Upgrade current Docker you are running. From Docker version onwards 20.10.6, it seems to fix the issue.

As a reference to the issue on GitHub related to this issue, you can find it at root user has no permissions within container #884 .

For posterity, the solution from GitHub:

you'll need to update Docker, runc, and likely libseccomp on your host.

over 4 years ago · Santiago Trujillo Relatório

0

Problem occurs with version postgres:12.9 upgrade to version postgres:13-alpine fix this problem.

over 4 years ago · Santiago Trujillo Relatório

0

If you cannot or don't want to – for whatever reason – upgrade Docker, a quick workaround is to use a different tag, such as postgres:14-alpine.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda