I created an image for my application and uploaded it as private
repository in registry.hub.docker
.
Now I every time I try to pull it, I get the following error
FATA[0012] Repository not found
I have successfully authenticated myself with docker using docker login
command
Command I ran
## docker login
docker login
Username (werain): werain
WARNING: login credentials saved in /Users/werain/.dockercfg.
Login Succeeded
## docker pull
docker pull werain/digitdem
Any Clue?
答案 0 :(得分:0)
推拉时使用完整的图片名称,包括标签:
docker push werain/digitdem:latest
docker pull werain/digitdem:latest
当你没有指定时,Docker通常假定你的意思是latest
,但是如果你想使用你自己的标签,或者你没有按照你试图拉动的那个标签,那么省略标签不起作用。
答案 1 :(得分:0)
将.netrc文件添加到dockerfile中将在docker容器内传递凭据,并有助于提取多个私有存储库以建立依赖关系
#vim .netrc
machine github.com
login < your github token >
添加这两行并传递您的github令牌
然后通过添加以下行来将.netrc文件复制到容器中
COPY .netrc /root/