Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道使用“docker build”从 Dockerfile 构建图像,它会将 tar 打包到 Docker 守护程序。
构建镜像时它如何在 Docker 守护进程上工作?它是创建一个临时容器吗?
一个 Docker 镜像大致相当于其他虚拟机环境中的“快照”。它是 Docker 虚拟机或 Docker 容器在某个时间点的记录。将 Docker 映像想象成一张数字图片。可以将 Docker 容器视为该图片的打印输出。Docker 镜像具有不可变的特殊特性。它们无法修改,但可以复制、共享或删除。在测试新软件或配置时,不变性很有用,因为无论发生什么,图像仍然存在,一如既往地可用。