运行docker run时无法在本地找到docker映像

时间:2019-06-14 13:31:19

标签: docker

如您所见,我有以下图像

vinay@idol-nifi-web-1 ~ $ docker images
    REPOSITORY                                            TAG                 IMAGE ID            CREATED             SIZE
    gcr.io/idol-demo/idol-web-nifi                        <none>              0de8fa3d35d4        About an hour ago   5.62GB
    debian                                                latest              e1de74e67cc7        3 days ago          101MB
    gcr.io/gce-containers/konlet                          v.0.9-latest        da64965a2b28        8 months ago        73.4MB
    gcr.io/stackdriver-agents/stackdriver-logging-agent   0.2-1.5.33-1-1      fcfafd404600        11 months ago       548MB

我正在尝试运行idol-web-nifi图像,但由于无法找到该图像而无法运行。

vinay@idol-nifi-web-1 ~ $ docker run --mac-address="42:01:0A:98:00:02" -it --entrypoint /bin/bash gcr.io/idol-demo/idol-web-nifi:latest
Unable to find image 'gcr.io/idol-demo/idol-web-nifi:latest' locally
docker: Error response from daemon: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the
 steps in: https://cloud.google.com/container-registry/docs/advanced-authentication.
See 'docker run --help'

1 个答案:

答案 0 :(得分:1)

此图像没有latest标签:

REPOSITORY                                            TAG
gcr.io/idol-demo/idol-web-nifi                        <none>

因此,您必须在没有标签的情况下运行它或对其进行标签:

docker run gcr.io/idol-demo/idol-web-nifi
# or
docker tag gcr.io/idol-demo/idol-web-nifi gcr.io/idol-demo/idol-web-nifi:latest
docker run gcr.io/idol-demo/idol-web-nifi:latest