DEV Community

How to run a PostgreSQL inside docker only using Docker Desktop

There are a lot of videos showing how to run PostgreSQL using Docker CLI., but i don't find any showing how to do this using only Docker Desktop.

Docker desktop is a friendly user interface and if you are a beginner could be a great thing to learn how to use.

well, first you need to download the PostgreSQL docker image, you can do this without using any cli commands, just follow the path:

  • Search for postgre in the search bar.

Image description

  • Pull the postgre image:
    Image description

  • Wait it to download...

  • After this, in the image, tab you will find your docker image.
    Image description

  • Hit the run button
    Image description

  • Click on "optional Settings" and set the configurations to your desire, don't forget to add a variable "POSTGRES_PASSWORD", it will be your PostgreSQL password:

Image description

Image description

  • After this, just hit the run button.

  • user: postgres

  • password:postgres

  • Connect to Dbeaver:

Image description

Top comments (0)