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>';"

沒有留言:

張貼留言

2007 to 2023 HP and Dell Servers Comparison

  HP Gen5 to Gen11  using ChatGPT HP ProLiant Gen Active Years CPU Socket Popular HP CPUs Cores Base Clock Max RAM Capacity Comparable Dell ...