Difficulty: Beginner
Estimated Time: 10 minutes

In this tutorial you will launch an instance of pgAdmin 4 running in a Docker container.

Commands to run are shown in grey boxes throughout the tutorial. Click on the boxes or copy and paste the commands into the terminal to execute each command.

Congratulations! You have now installed pgAdmin 4 in a Docker container.

pgAdmin 4 Installation using a Docker Container

Step 1 of 4

Step 1 - Launch the Container

This tutorial will use the official pgAdmin 4 container from Docker Hub. We will execute the docker run command, passing the required parameters for a basic pgAdmin configuration. For more details on the available configuration options, see the pgAdmin Documentation.

The command to run is shown below. Click it or copy and paste it into the terminal window to launch the container:

docker run \ -p 80:80 \ -e "[email protected]" \ -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" \ -d dpage/pgadmin4:latest

  • -p 80:80 - This directive maps port 80 of the container to port 80 of the host.
  • -e "[email protected]" - This directive sets the initial username to login to pgAdmin with.
  • -e "PGADMIN_DEFAULT_PASSWORD=SuperSecret" - This directive sets the initial password to login to pgAdmin with.
  • -e "-d dpage/pgadmin4:kctest" - This directive specifies the container and tag to run.

Once the command has completed and the command prompt is shown again, click Continue to move to the next step.