Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wercker deploy returns 404 for docker push

First time with Wercker and I'm using internal/docker-push. When I run my deployment step, I'm getting a 404 error from docker-hub.

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 

This isn't the first time I've run this step and it's worked before. The image exists and is here.

I can't figure out what could've changed.

Here is the wercker.yml file I'm using to perform the build and deploy.

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"
like image 975
Will Luce Avatar asked Oct 18 '22 03:10

Will Luce


1 Answers

As discussed on Wercker slack channel and suggested @cggaldes, the solution is to set the full registry address on the step definition, like:

- internal/docker-push:
    registry: https://registry.hub.docker.com/v2   <-- This
    repository: org/repo
    username: $DOCKER_USER
    password: $DOCKER_PASS
    ...

Apparently internal/docker-push uses v1 by default which has recently changed/broken.

like image 99
goenning Avatar answered Oct 21 '22 09:10

goenning