docker方式实现postgres数据持久化离线安装

保存镜像

root@hello:~# docker pull postgres
Using default tag: latest
latest: Pulling from library/postgres
a2abf6c4d29d: Already exists 
e1769f49f910: Pull complete 
33a59cfee47c: Pull complete 
461b2090c345: Pull complete 
8ed8ab6290ac: Pull complete 
495e42c822a0: Pull complete 
18e858c71c58: Pull complete 
594792c80d5f: Pull complete 
794976979956: Pull complete 
eb5e1a73c3ca: Pull complete 
6d6360292cba: Pull complete 
131e916e1a28: Pull complete 
757a73507e2e: Pull complete 
Digest: sha256:f329d076a8806c0ce014ce5e554ca70f4ae9407a16bb03baa7fef287ee6371f1
Status: Downloaded newer image for postgres:latest
docker.io/library/postgres:latest
root@hello:~# 
root@hello:~# docker save > postgres.tar postgres:latest 
root@hello:~# ll postgres.tar
-rw-r--r-- 1 root root 381950976 Mar 30 08:04 postgres.tar
root@hello:~#

导入镜像

启动容器

访问测试

https://www.oiox.cn/

https://www.chenby.cn/

https://cby-chen.github.io/

https://weibo.com/u/5982474121

https://blog.csdn.net/qq_33921750

https://my.oschina.net/u/3981543

https://www.zhihu.com/people/chen-bu-yun-2

https://segmentfault.com/u/hppyvyv6/articles

https://juejin.cn/user/3315782802482007

https://space.bilibili.com/352476552/article

https://cloud.tencent.com/developer/column/93230

https://www.jianshu.com/u/0f894314ae2c

https://www.toutiao.com/c/user/token/MS4wLjABAAAAeqOrhjsoRZSj7iBJbjLJyMwYT5D0mLOgCoo4pEmpr4A/

CSDN、GitHub、知乎、开源中国、思否、掘金、简书、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客、全网可搜《小陈运维》

最后更新于