fbpx

PostgreSQL Docker Image

The PostgreSQL project maintains an official Docker image for PostgreSQL, which is available on the Docker Hub. This image is based on the official Alpine Linux image, and includes the PostgreSQL server and client programs, as well as additional utilities for managing and configuring the database.

To use the PostgreSQL Docker image, you can pull the image from the Docker Hub using the following command:

				
					docker pull postgres

				
			

This will download the latest version of the PostgreSQL Docker image to your local machine. You can then use the docker run command to create a new container based on this image, and start the PostgreSQL server.

For example, the following command will create a new container named “my-postgres”, start the PostgreSQL server, and set the password for the default “postgres” user:

				
					docker run --name my-postgres -e POSTGRES_PASSWORD=mypassword -d postgres
				
			

Once the container is running, you can connect to the PostgreSQL server using a client like psql, and use the password that you specified in the docker run command to authenticate.

For more information about using the PostgreSQL Docker image, you can refer to the image documentation on the Docker Hub, or consult the official PostgreSQL documentation.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Social Media

Most Popular

Get The Latest Updates

Subscribe To Our Weekly Newsletter

No spam, notifications only about new products, updates.

Categories