无法将图像推送到openshift注册表

我安装了openshift(Master和Slave) .

oc version
oc v3.7.23
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://cbc-rh-os-m01.com:8443
openshift v3.7.23
kubernetes v1.7.6+a08f5eeb62

我有持久卷(Netapp Trident)映射到openshift注册表 .

当我尝试将图像部署到注册表中时,它会给出这个

[root@cbc-rh-os-m01 ~]# docker push 172.30.84.81:5000/default/hello-world:v1
The push refers to a repository [172.30.84.81:5000/default/hello-world]
f999ae22f308: Retrying in 1 second
received unexpected HTTP status: 500 Internal Server Error

当我在内部查找日志时,我发现了这一点 .

time =“2018-03-12T14:44:59.500127756Z”level = debug msg =“filesystem.PutContent(\”/ docker / registry / v2 / repositories / default / hello-world / _uploads / 92e5122e-ae51-43c3-a76d -b52b63da2012 / startedat \“)”go.version = go1.8.3 http.request.host =“172.30.84.81:5000”http.request.id = 01806345-1d84-43d4-abe3-9a57e44c9dd7 http.request.method = POST http.request.remoteaddr =“10.128.0.1:52916”http.request.uri =“/ v2 / default / hello-world / blobs / uploads /”http.request.useragent =“docker / 1.12.6 go / go1 . 8.3 kernel / 3.10.0-693.21.1.el7.x86_64 os / linux arch / amd64 UpstreamClient(Docker-Client / 1.12.6 \(linux \))“instance.id = 163e0994-bfa3-4647-830b-a7ac9d51f92f openshift .auth.user = admin openshift.auth.userid = a93b53f4-2384-11e8-9e3a-0050569261d7 openshift.logger = registry trace.duration =118.164μstrace.file=“/ builddir / build / BUILD / atomic-openshift-git- 0.8edc154 / _output / local / go / src / github.com / openshift / origin / vendor / github.com / docker / distribution / registry / storage / driver / base / base.go“trace.func =”github.com/ openshift /产地/ VENDO r / github.com / docker / distribution / registry / storage / driver / base . (* Base).PutContent“trace.id = 4c482511-bbcd-4a7b-a80d-5d563ec64e60 trace.line = 95 vars.name =”default / hello-world“time =”2018-03-12T14:44:59.500412514Z“level = error msg =”响应已完成,错误“err.code = unknown err.detail =”filesystem:mkdir / registry / docker:permission denied“ err.message =“未知错误”go.version = go1.8.3 http.request.host =“172.30.84.81:5000”http.request.id = 01806345-1d84-43d4-abe3-9a57e44c9dd7 http.request.method = POST http.request.remoteaddr =“10.128.0.1:52916”http.request.uri =“/ v2 / default / hello-world / blobs / uploads /”http.request.useragent =“docker / 1.12.6 go / go1 . 8.3 kernel / 3.10.0-693.21.1.el7.x86_64 os / linux arch / amd64 UpstreamClient(Docker-Client / 1.12.6 \(linux \))“http.response.contenttype =”application / json; charset = utf-8“http.response.duration = 11.001444ms http.response.status = 500 http.response.written = 156 instance.id = 163e0994-bfa3-4647-830b-a7ac9d51f92f openshift.auth.user = admin openshift . auth.userid = a93b53f4-2384-11e8-9e3a-0050569261d7 openshift.logger = registry vars.name =“default / hello-world”10.128.0.1 - - [12 / Mar / 2018:14:44:59 0000]“POST / v2 / default / hello-world / blobs / uploads / HTTP / 1.1“500 156”“”docker / 1.12.6 go / go1.8.3 kernel / 3.10.0-693.21.1.el7.x86_64 os / linux arch / amd64 UpstreamClient(Docker-Client / 1.12.6 \(linux \))“

帮助将非常感激

回答(1)

2 years ago

在openshift中创建二进制文件:

oc new-build --name=hello-world --binary=true

cd到 Dockerfile 所在的目录 .

oc start-build hello-world --from-dir=hello-world --follow