1 / 15
文档名称:

docker使用培训.ppt

格式:ppt   大小:497KB   页数:15页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

docker使用培训.ppt

上传人:350678539 2021/12/2 文件大小:497 KB

下载得到文件列表

docker使用培训.ppt

文档介绍

文档介绍:Docker使用培训
container创建流程
container使用注意事项
如何创建image
docker实现原理介绍
第一页,共15页。
Container创建流程
1、私有image repository
2、pull image
3、创建container
第二页,共15页。
Container创建流程
1、私有image repository
:5000/v1/search
第三页,共15页。
Container创建流程
1、pull image
第四页,共15页。
Container创建流程
1、pull image
第五页,共15页。
Container创建流程
1、创建container
docker images
dps
ssh ******@localhost -p 5022
第六页,共15页。
Container创建流程
1、创建container
第七页,共15页。
Container创建流程
2、container扩容
SID=6a49287c2b75
SIZE=64
CID=$(docker inspect $SID|grep $SID|grep ID|awk -F\" '{print $4}')
DEV=$(basename $(echo /dev/mapper/docker-*-$CID))
dmsetup table $DEV | sed "s/0 [0-9]* thin/0 $(($SIZE*1024*1024*1024/512)) thin/" | dmsetup load $DEV
dmsetup resume $DEV
resize2fs /dev/mapper/$DEV
第八页,共15页。
Container使用注意事项
1、尽量不要restart container,有可能会使已做的配置清除。
2、不要修改hostname(hostname=container id),可能会导致container不可用。
第九页,共15页。
Dockerfile指令
FROM:镜像的名称
FROM格式:FROM <image>或者FROM <image>:<tag>
MAINTAINER:作者的名字
MAINTAINER格式:MAINTAINER <name>
RUN:将会在当前镜像执行任何命令并提交结果
RUN格式:RUN <command>
RUN例子:
*
第十页,共15页。