《专题五 容器化微服务》之《第二章 容器化技术》之《第一节 Docker容器》
文章目录
- 《2.1.1 docker介绍及使用》
- 《2.1.2 docker 的存储和网络》
- 《2.1.3 docker 实践》
《2.1.1 docker介绍及使用》
- 3分 概念:
- 虚拟机 vs 容器:
- 12 7 docker服务架构
- 12 40 Docker:Build,Ship,Run
- 13 50 Docker安装:按官网上的Install Docker Engine on CentOS。Start Docker:
sudo systemctl start docker
- Docker启停容器等命令:
我实验用的命令,以及结果(部分):
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest bf756fb1ae65 13 months ago 13.3kB
docker create --name test hello-world
3a68df3746346a7942a13903083927780ff0a5eaff950dba6853de18f6b20c41
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3a68df374634 hello-world "/hello" About a minute ago Created test
ced7b419db32 hello-world "/hello" 3 hours ago Exited (0) 3 hours ago trusting_rosalind
docker start test
docker logs test
docker stop test
又如docker create --name testRedis hub.c.163.com/public/redis:2.8.4
后,docker ps -a
:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b4ac0866bd98 hub.c.163.com/public/redis:2.8.4 “/run.sh” 48 seconds ago Created testRedis
ed7a89668594 hello-world “/hello” 11 minutes ago Exited(0) 8 minutes ago test
d0fb817256c1 hello-world “/hello” 18 minutes ago Exited (0) 18 minutes ago flamboyant_ramanujan
90f794425930 hello-world “/hello” 18 minutes ago Exited (0) 18 minutes ago unruffled_wozniak
docker start testRedis
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b4ac0866bd98 hub.c.163.com/public/redis:2.8.4 "/run.sh" 8 minutes ago Up 36 seconds 6379/tcp testRedis
ed7a89668594 hello-world "/hello" 19 minutes ago Exited (0) 16 minutes ago test
d0fb817256c1 hello-world "/hello" 26 minutes ago Exited (0) 26 minutes ago flamboyant_ramanujan
90f794425930 hello-world "/hello" 26 minutes ago Exited (0) 26 minutes ago unruffled_wozniak
查看其日志:docker logs testRedis
- 22 20 docker容器状态转化:
- 23 50 Docker容器隔离
- 28 19+ Docker对容器的资源使用限制
- 36 32+ Docker容器的进程与容器状态
- 39 45+ 如何制作docker镜像
- docker镜像是什么:
- docker镜像是什么:
- 41 43+ Dockerfile镜像制作示例:
- 41 43+ Dockerfile镜像制作示例:
- 48 12+ Docker镜像分发
- 66 53+ Dockerfile常用指令
- 69 40 如何优雅地写Dockerfilie:
docker应尽量做到专一,多个docker可通过组合来完成复杂功能,可秒级部署且更灵活
- 69 40 如何优雅地写Dockerfilie:
《2.1.2 docker 的存储和网络》
- 9:30 docker volume 容器数据卷:
- 12 54+ docker容器如何与宿主机共享数据
- 19 32 Docker的volume模块。我:volumeName相当于卷的变量,本质是对上图的hostPath的封装。卷的生命周期和容器的生命周期是独立的
- 19 32 Docker的volume模块。我:volumeName相当于卷的变量,本质是对上图的hostPath的封装。卷的生命周期和容器的生命周期是独立的
- 25 49+ Docker高速存储卷
- 27 21 docker三种卷共享方式的比较
- 27 21 docker三种卷共享方式的比较
- 29 1+ Docker容器的网络:
- 32 21+ 容器网络的隔离沙箱:net namespace
- 34 30 两个容器如何网络互通:
- 34 30 两个容器如何网络互通:
- 40 13+ 多容器如何网络互通
- 43 37 Docker Bridge模式
- 53 17+ 容器跨节点间通信
《2.1.3 docker 实践》
- 9 9 容器化改造流程
- 56 16 日志和监控查看:
- 60 44 升级和故障迁移
- 63 30 容器编排调度:
还没有评论,来说两句吧...