我想运行一个skopeo容器作为一个集装箱作业。
在初始化容器步骤期间,我一直收到此错误消息
Error response from daemon: Container 7e741e4aafb30bb89e1dfb830c1cb69fa8d47d219f28cc7b8e57727253632256 is not running
我的管道是这样的:
- job: publish_branch_image
pool:
vmImage: ubuntu-latest
container: docker.io/ananace/skopeo:latest
steps:
- script: |
# clean branchname for imagename
export COMMIT_IMAGE="$(Image.TagName)"
export TARGET_IMAGE="$(Image.Name)":$(echo $(Build.SourceBranch) | sed 's./.-.g')
echo "Pushing to ${TARGET_IMAGE}"
skopeo copy docker://${COMMIT_IMAGE} docker://${TARGET_IMAGE} --src-creds="$(Registry.USER):$(Registry.PASSWORD)" --dest-creds="$(Registry.USER):$(Registry.PASSWORD)"
displayName: publish-branch-release-image发布于 2021-01-13 08:45:58
根据错误消息,容器似乎没有运行,我们可以运行cmd docker pull docker.io/ananace/skopeo:latest来提取图像并通过docker run docker.io/ananace/skopeo:latest运行它,然后我们可以使用它。
Update1
感谢米希尔的分享,根据端点和基于Linux的容器医生的说法
容器可以托管在Docker集线器以外的注册表中。若要在Azure容器注册表或其他私有容器注册表上承载图像,请将服务连接添加到专用注册表。然后您可以在容器规范中引用它:
container:
image: xxx/xxx:tag
endpoint: xxxhttps://stackoverflow.com/questions/65680823
复制相似问题