Skip to content

postgres not found #1314

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
dwhitnall opened this issue Feb 8, 2025 · 6 comments
Open

postgres not found #1314

dwhitnall opened this issue Feb 8, 2025 · 6 comments

Comments

@dwhitnall
Copy link

dwhitnall commented Feb 8, 2025

Hi all, this has just started happening and I have no idea where to start to resolve it as I have been running the same image on 3 containers (different stacks) for over a year.
The image I've been using is postgres:14
However recently I've been getting this

postgres-lube  |
postgres-lube  | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres-lube  |
postgres-lube  | /usr/local/bin/docker-entrypoint.sh: line 351: exec: postgres: not found
postgres-lube exited with code 127

Compose YML

  postgres:
    container_name: postgres-lube
    image: postgres:14
    restart: unless-stopped
    networks:
      - lubelogger
    environment:
      POSTGRES_USER: "l****"
      POSTGRES_PASSWORD: "l*****"
      POSTGRES_DB: "lubelogger"
    volumes:
      - /home/docker/lubelogger/pgdata/data:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro

This has been plaguing me for a number of days now.

@tianon
Copy link
Member

tianon commented Feb 10, 2025

My best guess is a corrupted image -- did you perhaps run out of space while downloading it? Have you tried forcibly purging it and re-downloading?

@pv-jeff
Copy link

pv-jeff commented Feb 14, 2025

I ran into this issue today.
It seemed to correlate to the postgres:17-bullseye build being updated from 17.2 -> 17.3 .
I updated from using postgres:17-bullseye to postgres:17.2-bullseye and I stopped getting the error and image worked as expected.

@LaurentGoderre
Copy link
Member

What do you get when you do docker inspect postgres:17-bullseye?

@pv-jeff
Copy link

pv-jeff commented Feb 14, 2025

[
    {
        "Id": "sha256:91f532353ef8455b11785fc113a347cd6aab126111cd797fe5cfe842178abd6c",
        "RepoTags": [
            "postgres:17-bullseye"
        ],
        "RepoDigests": [
            "postgres@sha256:fd725f9bc66d1f73e0b4a9fc7d1297b8bb6ec7706abf3b177e6d591343de5b05"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2025-02-13T19:01:08Z",
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "5432/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/17/bin",
                "GOSU_VERSION=1.17",
                "LANG=en_US.utf8",
                "PG_MAJOR=17",
                "PG_VERSION=17.3-1.pgdg110+1",
                "PGDATA=/var/lib/postgresql/data"
            ],
            "Cmd": [
                "postgres"
            ],
            "Image": "",
            "Volumes": {
                "/var/lib/postgresql/data": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": null,
            "StopSignal": "SIGINT"
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 482015544,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/21ccd63058dd2de85f30757b4a066486a324842909c7d03635c63baa53f28139/diff:/var/lib/docker/overlay2/51ace6d0b2a897fc32be4cbbc3968f1708e82fa012cf3fe0825031533eebe45d/diff:/var/lib/docker/overlay2/eaf6fa3d1c2048a4aaabe1db60dad85dce61cd1c22acfcb43abeda88f2855ec9/diff:/var/lib/docker/overlay2/9be62dc902f5015713191bee7d888319664f864df25507317caeef761f5e7116/diff:/var/lib/docker/overlay2/20fe1fc2b478cb1effd615d51c5901fe920af2b651bc0859cbd6d3d87d71a548/diff:/var/lib/docker/overlay2/08627c0d3262565e18793dc0f66be2432f414e98a17cdb77e210e670fd1cdeca/diff:/var/lib/docker/overlay2/7ae8e2ffb402555a348b923f0751cee6fdd5a606814433ad96c82550df9c1602/diff:/var/lib/docker/overlay2/d1b351d8838c082fe3c4119ffdc2217668108a50a273c309adcb618b6999deb1/diff:/var/lib/docker/overlay2/fc51d53b3805aa2a66960cf7879a4395c736592c325f980a2c743ceea8bb6c74/diff:/var/lib/docker/overlay2/1e0a728ac51826cd9bac37c13714c959af557ae38eef68b2b36cc976e8bd8df2/diff:/var/lib/docker/overlay2/2803c53f11cbbdfcd3e759ed965e46038e291d6cc6690aa9dafe57043b8dad58/diff:/var/lib/docker/overlay2/2373eeb77a2e47d40cacd7bc6ccec0a985ec597bcca846ec4e1f482b321b03da/diff:/var/lib/docker/overlay2/5199f986798bdc017ea2ccf9e01475caab5e207d7aad2be1d6b0d1e015547d02/diff",
                "MergedDir": "/var/lib/docker/overlay2/b06e5a8d831b4164e01c174f7952bc9b7000d09d22395a17964d1481e800a8b3/merged",
                "UpperDir": "/var/lib/docker/overlay2/b06e5a8d831b4164e01c174f7952bc9b7000d09d22395a17964d1481e800a8b3/diff",
                "WorkDir": "/var/lib/docker/overlay2/b06e5a8d831b4164e01c174f7952bc9b7000d09d22395a17964d1481e800a8b3/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:2e1b2125e63e04bd32421253ef37c06451ba9b7ebb0b7f22466324c8a19a09c8",
                "sha256:5046a45741674a1468d277daa0164b51d9252958f0e2c3241a5a6ffd0ab4c217",
                "sha256:4ece836a9f615c6a66dc0c05201e49671adaed5853dcf56d3ea44cdc29f7b564",
                "sha256:df66198c69c68ee1883945a6ef0e3011815d36959353d022c2c5aae51b97f7a3",
                "sha256:7d2394445d9ec6d90a76a8d91c51880f45726b603ecf3ef9445c3fb98866e44f",
                "sha256:1bb477ceb831bcca72558a7c7cc46c9ab5beec0ad5144340c4798688305d6a99",
                "sha256:8984f0322d5dd1404b4a1ce2d2007eaaf6a14b45ca26e924aecb8bc705608789",
                "sha256:aa2afe1108d202290f03f72095bb402303a80a65352f65a255643cd9ebbf135f",
                "sha256:ea88834aeb902664c93e95277c1687aa5e4734d712913752986c23a76a648518",
                "sha256:5abf561982ecfd6a59965942603a69fe4c16902c33b610c2c732c86a11e276f8",
                "sha256:94c8270e69384bc1d410a368da97da9fba7123a6439ea10344c9681c36b56491",
                "sha256:be7ebe1dd031abc785c74bd86524b90528a0309105d6f0bf8f2a0c27d8288a40",
                "sha256:e57f71096c0b7a81c7214ac0a845071aac193fc9839219e377de1086afe2fe9d",
                "sha256:2ecc0995bc429c4eaa7f91f99f521bf5275bb14eeb68e119553751a203412647"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

@LaurentGoderre
Copy link
Member

What OS are you using on your host?

@pv-jeff
Copy link

pv-jeff commented Feb 14, 2025

Rocky 9.5
Docker version 27.5.1, build 9f9e405
Docker Compose version v2.32.4

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants