Created
June 21, 2024 17:57
-
-
Save ritiek/e00c04746d4681e74c982a1411e23112 to your computer and use it in GitHub Desktop.
PostgreSQL in Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start server with | |
sudo docker run -it --rm -e POSTGRES_PASSWORD=mysecretpassword postgres | |
# Connect to server either with | |
sudo docker exec -it 938645c5a5d9 psql -U postgres | |
# or with | |
sudo docker exec -u postgres -it 938645c5a5d9 psql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment