美文网首页OpenShift Origin
推送镜像到 OpenShift Docker Registry

推送镜像到 OpenShift Docker Registry

作者: Herman7z | 来源:发表于2018-03-22 14:07 被阅读23次

参考链接:
https://docs.openshift.org/latest/minishift/openshift/openshift-docker-registry.html

1. 登录openshift

oc login 

2. Logging Into the Registry

 docker login -u developer -p $(oc whoami -t) 172.30.1.1:5000

3. Tag the image against the OpenShift registry:

 docker tag my-app 172.30.1.1:5000/demo/my-app

4. Push the image to the registry to create an image stream with the same name as the application:

docker push 172.30.1.1:5000/demo/my-app

oc login 登录的账号下必须要有一个项目名字叫 demo, 否则push失败:

The push refers to a repository [172.30.1.1:5000/demo/my-app]
3b0f0a4f3170: Preparing
d9c3c2101c89: Preparing
d7b7f15e304e: Preparing
9dc9c11b0642: Preparing
9d7faa39069c: Preparing
fad38aebce1d: Waiting
0b03a1041cfa: Waiting
e6c596487341: Waiting
bebcbc6e4c04: Waiting
d1be66a59bc5: Waiting
unauthorized: authentication required

相关文章

网友评论

    本文标题:推送镜像到 OpenShift Docker Registry

    本文链接:https://www.haomeiwen.com/subject/mljaqftx.html