ldez / seihon

A simple tool to build and publish multi-arch images on the Docker Hub.
Other
21 stars 1 forks source link

Failing to push manifest #2

Closed andig closed 5 years ago

andig commented 5 years ago

I'm seeing strage output when pushing the manifest:

...
The push refers to repository [docker.io/andig/gravo]
980b5f672abe: Preparing
222f1693c440: Preparing
6cbd784cafb9: Preparing
b074f877f05a: Preparing
e64a3852ea35: Preparing
6cbd784cafb9: Layer already exists
b074f877f05a: Layer already exists
222f1693c440: Layer already exists
e64a3852ea35: Layer already exists
980b5f672abe: Pushed
v0.2.0-arm.v8: digest: sha256:63fbc7fc73cac5d66f1522b79107114ca664ec86e0532a3b3b61239e4e9ee996 size: 1366

Created manifest list docker.io/andig/gravo:v0.2.0

failed to put manifest docker.io/andig/gravo:v0.2.0: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

Error: failed to push manifest: &{/usr/local/bin/docker [docker manifest push andig/gravo:v0.2.0] [DOCKER_CLI_EXPERIMENTAL=enabled]  <nil> failed to put manifest docker.io/andig/gravo:v0.2.0: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

 failed to put manifest docker.io/andig/gravo:v0.2.0: errors:
denied: requested access to the resource is denied
unauthorized: authentication required

 [] <nil> 0xc00001c330 exit status 1 <nil> <nil> true [0xc00000e1c0 0xc00000e1d8 0xc00000e1d8] [0xc00000e1c0 0xc00000e1d8] [0xc00000e1d0] [0x1148490] 0xc00004ed20 <nil>}: exit status 1

It looks as this is coming from the docker side. However, pushing the images and creating the manifest is working fine. I can also publish fine from the command line using the same docker binary (/usr/local/bin/docker):

❯ docker manifest push andig/gravo:v0.2.0
sha256:40b82e39d75a9db726056c946c3829226e60523bb0b49a691262e811a0745193

Right now totally confused where this is coming from.

andig commented 5 years ago

I've traced this down to the manifest push command:

cmdMP := exec.Command("docker", "-D", "-l", "debug", "manifest", "push", fmt.Sprintf("%s:%s", imageName, version))
// cmdMP.Env = append(cmdMP.Env, envDockerExperimental)
pub.manifestPush = cmdMP

Once I disable the ENV variable, the publish works fine. Looks a little like a docker issue on OSX. Doing the same thing from the command line works fine:

~/htdocs/gravo master* 6s
❯ DOCKER_CLI_EXPERIMENTAL=enabled docker -D -l debug manifest push andig/gravo:v0.2.0
sha256:40b82e39d75a9db726056c946c3829226e60523bb0b49a691262e811a0745193

~/htdocs/gravo master*
❯ docker -D -l debug manifest push andig/gravo:v0.2.0
sha256:40b82e39d75a9db726056c946c3829226e60523bb0b49a691262e811a0745193

~/htdocs/gravo master*
❯ DOCKER_CLI_EXPERIMENTAL=disabled docker -D -l debug manifest push andig/gravo:v0.2.0
docker manifest push is only supported on a Docker cli with experimental cli features enabled

I do have experimental enabled in my docker config per default.

ldez commented 5 years ago

Fixed in v0.3.1