REPOSITORY< none> TAG< none> [英] REPOSITORY <none> TAG <none>

查看:152
本文介绍了REPOSITORY< none> TAG< none>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里尝试了解Docker,我开始了本教程。

I am new here trying to learn docker, I started this tutorial

https://docs.docker.com/engine/examples/nodejs_web_app/

构建您的图片

$ docker build -t mlotfi / centos-node-hello。

$ docker build -t mlotfi/centos-node-hello .

mlotfi https://hub.docker.com/ 中的用户名。

当我做了 docker图像,我得到:

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

更新:
在构建结束时我看到:

UPDATE: at the end of the build I see :

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

但是我已经有package.json在src目录中。

But I already have package.json in the src directory.

推荐答案

如果您的docker构建序列没有一直存在,这意味着它停止错误在Docker文件中的某个时间点。

That can happen if your docker build sequence does not got all the way, meaning it stops on error at some point in the Dockerfile.

中断进程的结果是由Dockerfile行建立的最后一个中间映像,在Dockerfile行之前,该文件行在执行失败之前

The result of that interrupted process is the last intermediate image built by the Dockerfile line that succeeded, just before the Dockerfile line that fail to execute properly.

其他原因列在什么是Docker < none>:< none> images?

Other reasons are listed in "What are Docker <none>:<none> images? "


每个码头图像由层组成,这些层彼此之间具有父子层次关系。

所有docker文件系统层默认存储在 / var / lib / docker / graph中。 Docker将它称为图形数据库

Each docker image is composed of layers, with these layers having a parent-child hierarchical relationship with each other.
All docker file system layers are by default stored at /var/lib/docker/graph. Docker calls it the graph database

< none>:< none> 它们代表中间图像,可以使用 docker images -a 查看。

<none>:<none> images stand for. They stand for intermediate images and can be seen using docker images -a.

另一种风格的< none>:< none> 图像是可能导致磁盘空间问题的悬挂图像。

悬挂的图像,需要修剪。当我们使用Dockerfile重建我们的 hello_world 图像时,它对旧的Fedora的引用变得没有标签和悬空。

Another style of <none>:<none> images are the dangling images which can cause disk space problems.
A dangling image and needs to be pruned. When our hello_world image was rebuilt using the Dockerfile, its reference to old Fedora became untagged and dangling.

您可以在什么是< none> 存储库和标签?为什么我在使用docker构建时出现?

you can see an example of dangling image in "What are <none> repository and tags? Why do they appear when I use docker build?".


下一个命令可以用来清理这些悬挂的图像。

The next command can be used to clean up these dangling images.



docker rmi $(docker images -f "dangling=true" -q)

在你的情况下,如果这是你第一次使用 docker build ,这不应该是一个悬挂的图像,而是中间的,我在这个答案中首先解释。

In your case, if this was the first time your used docker build, this should not be a dangling image, but an intermediate one as I explained first in this answer.

这篇关于REPOSITORY&lt; none&gt; TAG&lt; none&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆