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