Skip to content

Instantly share code, notes, and snippets.

@gmdias727
Last active January 13, 2026 19:03
Show Gist options
  • Select an option

  • Save gmdias727/c50d002bb8a3084f058a8f93b7c4bb1c to your computer and use it in GitHub Desktop.

Select an option

Save gmdias727/c50d002bb8a3084f058a8f93b7c4bb1c to your computer and use it in GitHub Desktop.
here I learned docker run command
docker run -it --rm -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=postgres -p 5432:5432 postgres:17.7-bookworm -d postgres
# OR
docker run -it --rm \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=postgres \
-p 5432:5432 \
-d postgres \
postgres:17.7-bookworm
# Are the same!
# This container will vanish at the end of the process
docker run -it --rm postgres:17.7-bookworm psql -h localhost -U postgres --port 5432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment