zzh@ZZHPC:/zdata/Github/greenlight$ docker pull postgres zzh@ZZHPC:/zdata/Github/greenlight$ docker run --name postgres17 -p 5432:5432 -e POSTGRES_USER=root -e POSTGRES_PASSWORD=root -d postgres:latest
zzh@ZZHPC:~$ docker exec -it postgres17 psql -U root psql (17.1 (Debian 17.1-1.pgdg120+1)) Type "help" for help. root=# SELECT current_user; current_user -------------- root (1 row) root=# CREATE DATABASE greenlight; CREATE DATABASE root=# \c greenlight You are now connected to database "greenlight" as user "root". greenlight=#
标签:Chapter,GoFurther,ZZHPC,Setup,greenlight,zzh,docker,root,user From: https://www.cnblogs.com/zhangzhihui/p/18548351