我正在尝试使用OpenShifts Build Config构建Dockerfile。
实际构建成功完成。
我已将build config设置为将生成的图像推送到dockerhub。我已经提供了一个包含我的用户名和密码到docker.io的秘密 - 并且已经仔细检查了凭据。
然而,当我运行此操作时,我收到以下错误:
Pushing image hughestech/grpcdev ... error: build error: Failed to
push image: unauthorized: authentication required
构建配置yml
apiVersion: v1
kind: BuildConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftNewApp
creationTimestamp: '2017-09-11T20:32:47Z'
labels:
app: grpcdev
name: grpcdev
namespace: testproject
resourceVersion: '72394'
selfLink: /oapi/v1/namespaces/testproject/buildconfigs/grpcdev
uid: 5f70c545-9730-11e7-ab81-002421dde3d7
spec:
nodeSelector: null
output:
pushSecret:
name: dockhub-hughestech
to:
kind: DockerImage
name: hughestech/grpcdev
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
uri: 'https://github.com/hughestech/grpcdev.git'
type: Git
strategy:
dockerStrategy:
from:
kind: ImageStreamTag
name: 'ubuntu:17.04'
type: Docker
triggers:
- github:
secret: gOH6EcI9bDDJu_P51gL5
type: GitHub
- generic:
secret: PfAkvrk8xWVgWhVMk77V
type: Generic
- imageChange:
lastTriggeredImageID: >-
i386/ubuntu@sha256:22021496a6dd003b7fdc264985a578fb771edafa4cc9f790dd5e4967823567b2
type: ImageChange
- type: ConfigChange
status:
lastVersion: 4
答案 0 :(得分:0)
我创建了一个新密码,并使用https://index.docker.io/v1/
作为网址,并将其与Builder
服务帐户相关联。