Trying to install postgresql16-client on an Alpine Docker Container

I’m trying to create a Docker container with postgresql16-client but i’m getting an error saying that the package does not exist.

I’m going to also install dotnet 8 on this container in order to run an API, the postgresql16-client i will be using to pg_dump a database

Image with Dockerfile and error

I have no clue which repositories I have to import, how do you know which repositories you need in Linux in order to install a program?

I found this site but I don’t know how to fetch this repository https://pkgs.alpinelinux.org/package/edge/main/x86_64/postgresql16-client

Any help is appreciated!

Asked By: mig50

||

According to your posted image, you are using alpine v3.15 which does not include postgresql16-client.

According to the link you posted, you would need to use either Alpine Edge or Alpine v3.19 for postgresql16-client to be available in the package repositories.

The only Alpine version with dotnet8-* packages right now is Alpine Edge, so you would need to use that version for your Docker containers.

A note if you are not aware: Alpine Edge is the current development tree of Alpine Linux used mainly for testing and may not be as stable as a released version.

Answered By: GracefulRestart