Skip to content

Instantly share code, notes, and snippets.

@basit26374
Created July 17, 2022 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basit26374/04456cc9044a19193651719673712102 to your computer and use it in GitHub Desktop.
Save basit26374/04456cc9044a19193651719673712102 to your computer and use it in GitHub Desktop.
Configure PostgreSQL in Docker Container
Pull the latest postgres dcoker image from docker.hub
> docker pull postgres
See list of all docker images
> docker images -a
<pre>REPOSITORY TAG IMAGE ID CREATED SIZE
postgres latest 1133a9cdc367 5 days ago 376MB
</pre>
docker run --name learn_postgres -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_USER=docker_user -p 5433:5432 -d -v pgdata:/var/lib/postgresql/data postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment