Step 1: Pull the Official PostgreSQL Image
We need to pull the official PostgreSQL image from Docker Hub. Open your terminal or command prompt and run:
docker pull postgres
# -- Instead, for a certain version of postgres, e.g. 14.5, run:
# docker pull postgres:14.5
And wait for the latest version of the PostgreSQL image to be downloaded.
Step 3: Connect to the PostgreSQL Database and Operate
Connect from the host machine
You can use the psql cammand to connect to your database.
psql -h localhost -U postgres
Connect within Docker
Or open an interactive terminal inside the container and connect to the PostgreSQL database with the postgres user.
docker exec -it mypostgres psql -h localhost -U postgres
Then we can operate with SQL command after the "#".

SOCIAL SHARE CARD GENERATOR