docker-library / docker-library/postgres

postgres not found

Open
#1,314 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
2.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported postgres:14 Compose service and /usr/local/bin/docker-entrypoint.sh at line 351, then reproduce the container failure and inspect the reported command-not-found condition. Done means identifying a reproducible cause for the missing postgres executable and documenting a confirmed resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, postgres, shell
Domain
databases, devops
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.