Skip to content

postgres:alpine linux/arm64: exec format error (entrypoint shell files empty) #1378

Closed

Description

@dbIgel

The image sha256:48c8ad3a7284b82be4482a52076d47d879fd6fb084a1cbfccbd551f9331b0e40 has empty startup scripts and thus can not run.

When startet:

% docker run -it --rm --platform linux/arm64 postgres:alpine bash
exec /usr/local/bin/docker-entrypoint.sh: exec format error

Further inspection reveals that the entrypoint script is empty:

% docker run -it --rm --platform linux/arm64 --entrypoint /bin/sh postgres:alpine
/ # ls -al /usr/local/bin/*.sh
lrwxrwxrwx    1 root     root            23 Oct 22 17:40 /usr/local/bin/docker-enforce-initdb.sh -> docker-ensure-initdb.sh
-rwxr-xr-x    1 root     root             0 Oct 22 17:38 /usr/local/bin/docker-ensure-initdb.sh
-rwxr-xr-x    1 root     root             0 Oct 22 17:38 /usr/local/bin/docker-entrypoint.sh

In comparison, the (working) amd64 version (sha256:48c8ad3a7284b82be4482a52076d47d879fd6fb084a1cbfccbd551f9331b0e40):

% docker run -it --rm --platform linux/amd64 --entrypoint /bin/sh postgres:alpine
/ # ls -al /usr/local/bin/*.sh
lrwxrwxrwx    1 root     root            23 Oct 22 17:42 /usr/local/bin/docker-enforce-initdb.sh -> docker-ensure-initdb.sh
-rwxr-xr-x    1 root     root          2317 Oct 22 17:39 /usr/local/bin/docker-ensure-initdb.sh
-rwxr-xr-x    1 root     root         14646 Oct 22 17:39 /usr/local/bin/docker-entrypoint.sh

Activity

  1. yosifkit commented on Nov 5, 2025

    @yosifkit
    Member

    That seem like local state got corrupted. I checked the image on hub and the arm64 image has the entrypoint scripts. Pulling the image results in a correct entrypoint.sh:

    $ docker run -it --rm --platform linux/arm64 postgres:alpine bash
    Unable to find image 'postgres:alpine' locally
    alpine: Pulling from library/postgres
    e0cd6769e23c: Pull complete
    b0ad42f9114e: Pull complete
    d9708c695497: Pull complete
    b8766da0c426: Pull complete
    9f71dc4be8f8: Pull complete
    94800f566750: Pull complete
    6b59a28fa201: Pull complete
    aa4fc12bd3e6: Pull complete
    e268d9926fd7: Pull complete
    fa72dc705f57: Pull complete
    Digest: sha256:48c8ad3a7284b82be4482a52076d47d879fd6fb084a1cbfccbd551f9331b0e40
    Status: Downloaded newer image for postgres:alpine
    b2581b43bcdf:/# ls -al /usr/local/bin/*.sh
    lrwxrwxrwx    1 root     root            23 Oct 22 17:40 /usr/local/bin/docker-enforce-initdb.sh -> docker-ensure-initdb.sh
    -rwxr-xr-x    1 root     root          2317 Oct 22 17:38 /usr/local/bin/docker-ensure-initdb.sh
    -rwxr-xr-x    1 root     root         14646 Oct 22 17:38 /usr/local/bin/docker-entrypoint.sh
    b2581b43bcdf:/#
    exit
  2. locked and limited conversation to collaborators on Nov 5, 2025
  3. converted this issue into a discussion #1379 on Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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