Wil*_*uce 5 docker wercker dockerhub
第一次与Wercker和我一起使用internal/docker-push.当我运行部署步骤时,我从docker-hub收到404错误.
ERROR Error interacting with this repository: wluce/statler-waldorf-corp-team-service PUT https://registry.hub.docker.com/v1/repositories/wluce/statler-waldorf-corp-team-service/ returned 404
Run Code Online (Sandbox Code Playgroud)
这不是我第一次运行这一步并且之前有效.图像存在并且在这里.
我无法弄清楚什么可以改变.
这是wercker.yml我用来执行构建和部署的文件.
box: microsoft/dotnet:2.0.0-sdk-2.0.2
no-response-timeout: 10
build:
steps:
- script:
name: restore
cwd: src/StatlerWaldorfCorp.TeamService
code: dotnet restore
- script:
name: build
cwd: src/StatlerWaldorfCorp.TeamService
code: dotnet build
- script:
name: test-restore
cwd: test/StatlerWaldorfCorp.TeamService.Tests
code: dotnet restore
- script:
name: test-build
cwd: test/StatlerWaldorfCorp.TeamService.Tests
code: dotnet build
- script:
name: test-run
cwd: test/StatlerWaldorfCorp.TeamService.Tests
code: dotnet test
- script:
name: integration-test-restore
cwd: test/StatlerWaldorfCorp.TeamService.Tests.Integration
code: dotnet restore
- script:
name: integration-test-build
cwd: test/StatlerWaldorfCorp.TeamService.Tests.Integration
code: dotnet build
- script:
name: integration-test-run
cwd: test/StatlerWaldorfCorp.TeamService.Tests.Integration
code: dotnet test
- script:
name: publish
cwd: src/StatlerWaldorfCorp.TeamService
code: dotnet publish -o publish
- script:
name: copy binary
cwd: src/StatlerWaldorfCorp.TeamService
code: cp -r . $WERCKER_OUTPUT_DIR/app
deploy:
box: microsoft/aspnetcore:2.0.0
steps:
- internal/docker-push:
cwd: $WERCKER_OUTPUT_DIR/app
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
repository: wluce/statler-waldorf-corp-team-service
registry: https://registry.hub.docker.com
entrypoint: "/pipeline/source/app/docker_entrypoint.sh"
Run Code Online (Sandbox Code Playgroud)
正如 Wercker slack 频道上所讨论的并建议@cggaldes,解决方案是在步骤定义上设置完整的注册表地址,例如:
- internal/docker-push:
registry: https://registry.hub.docker.com/v2 <-- This
repository: org/repo
username: $DOCKER_USER
password: $DOCKER_PASS
...
Run Code Online (Sandbox Code Playgroud)
显然internal/docker-push默认使用 v1,但最近已更改/损坏。
| 归档时间: |
|
| 查看次数: |
307 次 |
| 最近记录: |