Created
July 17, 2022 14:06
-
-
Save basit26374/04456cc9044a19193651719673712102 to your computer and use it in GitHub Desktop.
Configure PostgreSQL in Docker Container
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
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