2022年12月16日 星期五

docker with postgres:14.3

https://medium.com/alberthg-docker-notes/docker%E7%AD%86%E8%A8%98-%E9%80%B2%E5%85%A5container-%E5%BB%BA%E7%AB%8B%E4%B8%A6%E6%93%8D%E4%BD%9C-postgresql-container-d221ba39aaec

docker pull postgres:14.3
docker create --name my-postgres -p 8080:5432 -e POSTGRES_PASSWORD=admin postgres:14.3
docker start my-postgres


docker exec my-postgres psql --help
docker exec my-postgres psql -V
docker exec my-postgres psql -U postgres -l
docker exec -it my-postgres psql -U postgres
\q


docker exec -it my-postgres bash
apt-getupdate
apt-get install net-tools
172.17.0.2

docker exec -it my-postgres psql -U postgres -c "create role <user-name> with login password '<password>';"

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...