摘要: **由来** Docker 是将应用和环境打包成一个镜像。 这样,数据就不应该保存在容器中,否则容器删除,数据就会丢失,有着非常大的风险。 为此,容器和主机之间需要有一个数据共享技术,使得在 Docker 容器中产生的数据能够同步到本地。 这就是数据卷技术。其本质上是一个目录挂载,将容器内的目录挂载 阅读全文
posted @ 2024-05-28 21:11 ~沐心 阅读(21) 评论(0) 推荐(0)
摘要: 启动 Elasticsearch [root@localhost ~]# docker run -d --name elasticsearch01 -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.6. 阅读全文
posted @ 2024-05-28 19:14 ~沐心 阅读(23) 评论(0) 推荐(0)
摘要: [root@localhost ~]# docker pull portainer/portainer-ce Using default tag: latest latest: Pulling from portainer/portainer-ce 0ea73420e2bb: Pull comple 阅读全文
posted @ 2024-05-28 17:45 ~沐心 阅读(38) 评论(0) 推荐(0)
摘要: 1.配置阿里源 vim /etc/yum.repo/aliyun.repo [ali_baseos] name=ali_baseos baseurl=https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/ gpgchec 阅读全文
posted @ 2024-05-28 12:05 ~沐心 阅读(73) 评论(0) 推荐(0)
摘要: 点击查看代码 # 下载镜像 [root@192 home]# docker pull nginx Using default tag: latest latest: Pulling from library/nginx 8559a31e96f4: Pull complete 8d69e59170f7 阅读全文
posted @ 2024-05-28 11:34 ~沐心 阅读(38) 评论(0) 推荐(0)
摘要: 需求: 在Docker容器中部署Tomcat,并通过外部机器访问Tomcat部署的项目。 点击查看代码 #下载 [root@localhost ~]# docker pull tomcat #启动运行 [root@localhost ~]# docker run -d -p 3355:8080 -- 阅读全文
posted @ 2024-05-28 10:51 ~沐心 阅读(36) 评论(0) 推荐(0)