我是新来学码头的,我开始学习这个教程。
塑造你的形象
$ docker build -t mlotfi/centos-节点-hello。
mlotfi是我的https://hub.docker.com/用户名
当我做docker images的时候,我得到:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> sha256:189cb 27 seconds ago 485.1 MB
centos centos6 sha256:d0a31 12 days ago 228.9 MB而不是:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
mlotfi/centos-node-hello latest sha256:189cb 27 seconds ago 485.1 MB
centos centos6 sha256:d0a31 12 days ago 228.9 MB更新:在构建的末尾,我看到:
Complete!
---> e053d8f57e5c
Removing intermediate container 060f921fd08c
Step 4 : COPY package.json /src/package.json
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and
directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and r
eset permissions for sensitive files and directories.
lstat package.json: no such file or directory但是我已经在src目录中有了package.json。
发布于 2016-03-18 07:59:43
如果您的停靠程序构建序列没有全部获得,就会发生这种情况,这意味着它会在Dockerfile中的某个点停止错误。
中断的进程的结果是成功的Dockerfile行生成的最后一个中间映像,就在未能正确执行的Dockerfile行之前。
其他原因列在" images? “中
每个对接者图像由层组成,这些层之间具有父子层次关系。 默认情况下,所有停靠文件系统层都存储在
/var/lib/docker/graph中。Docker称它为图形数据库<none>:<none>图像代表。它们代表中间图像,可以在docker images -a上看到。 另一种类型的<none>:<none>映像是悬空映像,它可能导致磁盘空间问题。 一个悬空的图像,需要修剪。当使用Dockerfile重建我们的hello_world映像时,它对旧Fedora的引用就会被取消标记和悬空。
您可以在" repository and tags? Why do they appear when I use docker build?“中看到悬挂图像的示例。
下一个命令可以用来清除这些悬空的图像。
docker rmi $(docker images -f "dangling=true" -q)在您的例子中,如果这是您第一次使用docker build,那么这不应该是一个悬空的图像,而应该是一个中间的映像,正如我在这个答案中首先解释的那样。
https://stackoverflow.com/questions/36068993
复制相似问题