摘要: jdk 安装 # 1、查看系统是否自带JDK [root@localhost ~]# java -version openjdk version "1.8.0_282" # 2、查看相关java文件 # rpm -qa | grep java # 3、删除相关文件 rpm -e --nodeps j 阅读全文
posted @ 2021-03-18 10:25 古城,老巷 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 代码 public class TestClass { public static int k=0; public static TestClass t1=new TestClass("t1"); public static TestClass t2=new TestClass("t2"); pub 阅读全文
posted @ 2020-08-24 14:25 古城,老巷 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 构建springboot项目 打包应用 编写dockerfile 构建镜像 发布运行! [root@localhost demo]# ls demo02-0.0.1-SNAPSHOT.jar Dockerfile # Dockerfile文件 [root@localhost demo]# cat D 阅读全文
posted @ 2020-08-16 19:38 古城,老巷 阅读(348) 评论(0) 推荐(1) 编辑
摘要: 理解docker0 [root@localhost ~]# ip addr # 本机回环地址 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopba 阅读全文
posted @ 2020-08-16 15:15 古城,老巷 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 什么是容器数据卷 如果数据都在容器中,一旦容器删除,数据就会丢失! eg : mysql容器删了,就是我们常说的删库跑路。 需求:数据可以持久化,即时删掉容器,我们的数据还在 容器直接可以有一个数据共享的技术!Docker容器产生的数据,同步到本地! 这就是卷技术!目录的挂载,将我们容器的目录挂载到 阅读全文
posted @ 2020-08-16 15:14 古城,老巷 阅读(235) 评论(0) 推荐(0) 编辑
摘要: dockerfile 是用来构建docker镜像的文件!命令参数脚本! 构建步骤: 编写一个dockerfile 文件 docker build 构建成一个镜像 docker run 运行镜像 docker push 发布镜像(DockerHub、阿里云镜像仓库) # 以contes为例 查看 do 阅读全文
posted @ 2020-08-16 15:13 古城,老巷 阅读(949) 评论(0) 推荐(0) 编辑
摘要: Docker 安装tomcat # 1、下载tomcat镜像 [root@bogon home]# docker pull tomcat Using default tag: latest latest: Pulling from library/tomcat d6ff36c9ec48: Pull 阅读全文
posted @ 2020-08-16 15:11 古城,老巷 阅读(607) 评论(0) 推荐(0) 编辑
摘要: Docker安装Nginx # 1、搜索镜像 推荐使用官网搜索 docker search nginx [root@bogon home]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE # 2、拉取镜像 [root@bogon home]# 阅读全文
posted @ 2020-08-16 15:09 古城,老巷 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 帮助命令 docker version # 显示docker的版本信息 docker info # 显示docker的系统信息,包括镜像和容器的数量 docker 命令 --help # 帮助命令 帮助文档的地址:https://docs.docker.com/engine/reference/ru 阅读全文
posted @ 2020-08-16 15:07 古城,老巷 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Docker的基本组成 镜像(image): docker镜像就好比是一个模板,可以通过这个模板来创建容器服务,tomcat镜像 >run >tomcat01容器(提供服务),通过镜像可以创建很多容器, 容器(container): Docker利用容器技术,独立运行一个或一组应用,通过镜像来创建的 阅读全文
posted @ 2020-08-16 15:05 古城,老巷 阅读(147) 评论(0) 推荐(0) 编辑