docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.14k stars 1.11k forks source link

Upgrade older images to OCI Format or Docker Image manifest v2, schema 2 #1236

Open OrangeDog opened 1 month ago

OrangeDog commented 1 month ago

If for some reason you need an old postgres image, such as postgres:8.4, you can no longer pull it:

8.4: Pulling from library/postgres [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of docker.io/library/postgres:8.4 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/

If possible, please can the older images on Docker Hub be upgraded?

If there's some Hub-wide solution for all default providers (the _/... images) that would be even better,

tianon commented 1 month ago

These very old images are a frequent topic of discussion at Docker (see https://github.com/docker/roadmap/issues/173 for a public tracking issue). It has not yet been decided what's going to happen to them in the future.

For your specific issue, you'll need to use a tool which understands the older format and can convert it for you (such as an older version of Docker).

vlsi commented 2 weeks ago

@tianon , I appreciate your answer, however we use stock GitHub Actions for testing pgjdbc with older PG versions, so I am not sure "use older Docker version" is an option.

Here's a recent CI failure: https://github.com/pgjdbc/pgjdbc/actions/runs/9659433599/job/26642807642#step:3:25

Pulling pgdb (postgres:8.4)... 8.4: Pulling from library/postgres [DEPRECATION NOTICE] Docker Image Format v1 and Docker Image manifest version 2, schema 1 support is disabled by default and will be removed in an upcoming release. Suggest the author of docker.io/library/postgres:8.4 to upgrade the image to the OCI Format or Docker Image manifest v2, schema 2. More information at https://docs.docker.com/go/deprecated-image-specs/

Do you think you could update the manifest for 8.4 image? I guess it is possible without rebuilding the image itself (see https://github.com/docker/cli/issues/3157#issuecomment-1168713339 )

LaurentGoderre commented 2 weeks ago

If it's only for CI use, you could use something like this to load just the filesystem.

crane export postgres:8.4 > postgres.tar
docker import postgres.tar postgres:8.4 
docker run postgres:8.4 /docker-entrypoint.sh