How to create custom User and Database name in script for Docker Postgres

Published: 06 April 2022
on channel: Programming Tutorial
166
like

#docker #postgresql #dockerscript
How to create custom User or Database name in script for Docker Postgres
Prerequisite
1. your laptop already install docker
2. your laptop have internet connection



Let's jump right in
1. make sure postgresql image already in local registry(docker images)
2. start a postgres instance with this command(docker run --name postgresql_try -e POSTGRES_PASSWORD=password -e POSTGRES_USER=user -e POSTGRES_DB=APP_DB -d postgres)
3. check docker container ip address
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgresql_try
4. check if postgresql installed on container(open using db client like dbeaver)


successful!!


Watch video How to create custom User and Database name in script for Docker Postgres online without registration, duration hours minute second in high quality. This video was added by user Programming Tutorial 06 April 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 166 once and liked it like people.