k8s学习笔记(三) -- docker[镜像]基础命令

1. 镜像信息

docker image inspect {image}

2. 搜索镜像

docker search {image}

3. 下载镜像

docker image pull {image[:TAG]}

4. 本地docker镜像列表

docker image ls

5. 创建镜像

// 1. 从容器中创建(不推荐)
docker container commit {image:TAG}

// 2. 根据Dockerfile创建
docker image build PATH | URL
// -t 指定生成的镜像, .表示使用当前路径名为Dockerfile的文件创建(其他名称需要 -f Dockerfile.filename)
docker image build -t {iamge:Tag} .

6.Dockerfile

// 基础镜像
FROM {iamge[:TAG]}

// 构建人信息
MAINTAINER {userName/user-email}

// 镜像创建过程的操作
RUN {command}

// 容器启动时执行的命令
CMD [command]

// 指定时区
ENV DEBIAN_FRONTEND=noninteractive

遇到的问题:

questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

  1. Africa      4. Australia  7. Atlantic  10. Pacific  13. Etc
  2. America     5. Arctic     8. Europe    11. Syste
需要在Dockerfile文件指定时区

ENV DEBIAN_FRONTEND=noninteractive

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值