我有一个带有Dockerfile的.Net Core网络应用程序。
我正在使用Azure DevOps管道来构建Docker镜像,并希望将该镜像推送到Docker Hub。
但是当我运行管道时,推送图像失败,并显示以下错误:
我正在使用Azure DevOps管道来构建Docker镜像,并希望将该镜像推送到Docker Hub。
但是当我运行管道时,推送图像失败,并显示以下错误:
2019-07-25T07:40:39.2332684Z ##[section]Starting: Push an image
2019-07-25T07:40:39.2340807Z ==============================================================================
2019-07-25T07:40:39.2340932Z Task : Docker
2019-07-25T07:40:39.2341017Z Description : Build, tag, push, or run Docker images, or run a Docker command
2019-07-25T07:40:39.2341132Z Version : 0.154.1
2019-07-25T07:40:39.2341206Z Author : Microsoft Corporation
2019-07-25T07:40:39.2341308Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/docker
2019-07-25T07:40:39.2341405Z ==============================================================================
2019-07-25T07:40:39.4058071Z e6868ba4-0951-4724-b13b-58e178dacb79 exists true
2019-07-25T07:40:39.5494209Z [command]/usr/bin/docker push dockerDemo2019:19
2019-07-25T07:40:39.5780069Z The push refers to repository [docker.io/library/dockerDemo2019]
2019-07-25T07:40:40.5429692Z b0f339cf7b16: Preparing
2019-07-25T07:40:40.5430778Z a385a9a129e2: Preparing
2019-07-25T07:40:40.5431098Z 6339615de93e: Preparing
2019-07-25T07:40:40.5431279Z c6c9de941dfa: Preparing
2019-07-25T07:40:40.5431433Z 9c894eb0930b: Preparing
2019-07-25T07:40:40.5431696Z d56055da3352: Preparing
2019-07-25T07:40:40.5431855Z d56055da3352: Waiting
2019-07-25T07:40:42.4737943Z denied: requested access to the resource is denied
2019-07-25T07:40:42.4880225Z ##[error]denied: requested access to the resource is denied
2019-07-25T07:40:42.4932585Z ##[error]/usr/bin/docker failed with return code: 1
2019-07-25T07:40:42.4960825Z ##[section]Finishing: Push an image
我的管道设置:
我已验证Dockerregistry服务连接,并已使用Dockerhub凭据进行了连接。
2.0*
后,构建成功了,但是会出现警告未指定任何存储库。不会推送任何内容。
- Amit Kumar