第一次和Wercker在一起,我正在使用internal/docker-push。当我运行我的部署步骤,我得到一个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 这不是我第一次运行这个步骤,而且它以前也起过作用。该图像存在并为这里。
我想不出是什么改变了。
下面是我用来执行构建和部署的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"发布于 2017-11-15 07:50:31
正如Wercker松弛通道和建议@cggaldes所讨论的那样,解决方案是在步骤定义上设置完整的注册表地址,如下所示:
- internal/docker-push:
registry: https://registry.hub.docker.com/v2 <-- This
repository: org/repo
username: $DOCKER_USER
password: $DOCKER_PASS
...显然,internal/docker-push默认使用的是最近更改/损坏的v1。
发布于 2017-11-15 11:02:38
在内部/停靠推进步骤中,只需添加带有附加v2的注册表,使wercker使用v2注册表api,如下所示
repository: gapostolov/course-repo
registry: https://registry.hub.docker.com/v2https://stackoverflow.com/questions/47278743
复制相似问题