我是docker中的新手,我想创建我的第一个Docker镜像。我从教程https://deis.com/blog/2015/creating-sharing-first-docker-image/开始,但我坚持使用docker pull步。
我创建了https://hub.docker.com/r/arturlwww/mavenlatestwebserver/,但是当我尝试运行
时docker pull arturlwww/mavenlatestwebserver
我收到错误
docker pull arturlwww/mavenlatestwebserver
Using default tag: latest
Error response from daemon: manifest for arturlwww/mavenlatestwebserver:latest not found
root@scw-97b47e:/home/Redis_Docker_Image/qqq#
如何解决此问题?
谢谢!
更新1: 我身上有些不对劲。我的Dockerfile是
FROM maven:latest
MAINTAINER ArtUrlWWW <email.id@here>
RUN apt-get update
RUN apt-get install -y rsync
好的,构建对我来说还不错:
docker build -t mavenlatestwebserver .
Sending build context to Docker daemon 2.56kB
Step 1/4 : FROM maven:latest
---> 88714384d642
Step 2/4 : MAINTAINER ArtUrlWWW <email.id@here>
---> Using cache
---> 850fc0ff0903
Step 3/4 : RUN apt-get update
---> Using cache
---> cfdc327fa6c2
Step 4/4 : RUN apt-get install -y rsync
---> Using cache
---> 8e6b64a1a3f5
Successfully built 8e6b64a1a3f5
Successfully tagged mavenlatestwebserver:latest
但是push
不起作用:
docker push mavenlatestwebserver
The push refers to a repository [docker.io/library/mavenlatestwebserver]
93223539f002: Preparing
1a5a1b1ca389: Preparing
e32a2ff74ef3: Preparing
9b78bc392c51: Preparing
93c45fd31089: Preparing
a07cd0e5de92: Waiting
cecc20f349f8: Waiting
c9e908787496: Waiting
c7ff02c44ca2: Waiting
555f98a2316c: Waiting
b0220a5743fa: Waiting
995042ba10ad: Waiting
fe40be59465f: Waiting
cf4ecb492384: Waiting
denied: requested access to the resource is denied
另一种推动也不起作用:
docker push arturlwww/mavenlatestwebserver
The push refers to a repository [docker.io/arturlwww/mavenlatestwebserver]
An image does not exist locally with the tag: arturlwww/mavenlatestwebserver
出错了什么? :)
答案 0 :(得分:2)
在Docker Hub页面中,它显示:上次推送:从不
您需要先构建并推送图像。那就是:
docker build -t your-image .
docker login (it will prompt your credentials
docker push your-image