podman/docker自定义网络使用postgres与pgadmin之间能访问
[root@k8s-30 ~]# podman network create -d bridge dnsname
/etc/cni/net.d/dnsname.conflist
[root@k8s-30 ~]# podman network ls
NAME VERSION PLUGINS
podman 0.4.0 bridge,portmap,firewall
dnsname 0.4.0 bridge,portmap,firewall
[root@k8s-30 ~]#
podman run -d --name postgres --network=dnsname -p 5432:5432 \
-e POSTGRES_PASSWORD=123456 \
-v /pgdata:/var/lib/postgresql/data \
registry.cn-hangzhou.aliyuncs.com/zhangweidong/postgres:12.3
a664ae2578d2dd1b016be21d964a2e8547b9b6bcc8d0a1bb1c281e16f9933858
[root@k8s-30 ~]#
podman run -d --name pgadmin4 --network=dnsname -p 8008:80 \
-e PGADMIN_DEFAULT_EMAIL=vip@.qq.com \
-e PGADMIN_DEFAULT_PASSWORD=8061000 \
-v /pgadmin:/var/lib/pgadmin \
registry.cn-hangzhou.aliyuncs.com/hellobike-public/pgadmin4:4.25
79ee7f73f30fa00f882a01c433e66f784d1f83b28fa3676dcfe58c5b577a7c59
[root@k8s-30 ~]#
目录 返回
首页