Last active
September 10, 2023 12:07
-
-
Save antheiz/18b98a89efdf979df96699bd907d321c to your computer and use it in GitHub Desktop.
Step for create PostgreSQL on Docker Container on Ubuntu
This file contains hidden or 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
| ### Step for create PostgreSQL and PGAdmin on Docker Container on Ubuntu | |
| --- | |
| * Step 1 - Download/Pull image Postgre on [Docker Hub](https://hub.docker.com/_/postgres) | |
| - docker pull postgres | |
| - docker pull postgres:alpine **(if you want to get version for your postgres please use this) | |
| * Step 2 - Check images postgres on your docker | |
| - docker images | |
| * Step 3 - for run your images and create your container name | |
| - docker run --name postgres -e POSTGRES_PASSWORD=password -d postgres | |
| * Step 4 - To check whether the container is running or not | |
| - docker ps -a | |
| * Step 5 - To enter the postgres bash system | |
| - docker exec -it postgres bash | |
| * Step 6 (optional) - Create container for PGAdmin | |
| - docker run --name pgadmin -p 5050:80 -e "[email protected]" -e "PGADMIN_DEFAULT_PASSWORD=rahasia" -d dpage/pgadmin4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment