cog icon indicating copy to clipboard operation
cog copied to clipboard

`No output specified with docker-container driver` error when using Docker buildx

Open zeke opened this issue 1 year ago • 2 comments

When running cog build or cog push from a GitHub Actions runner using Docker buildx, the following error occurs:

#3 [auth] library/cog-hello-world-cog:pull token for registry-1.docker.io
#3 DONE 0.0s

#2 [internal] load metadata for docker.io/library/cog-hello-world-cog:latest
#2 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [internal] load metadata for docker.io/library/cog-hello-world-cog:latest:
------
WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
Dockerfile:1
--------------------
   1 | >>> FROM cog-hello-world-cog
   2 |     COPY .cog/openapi_schema.json .cog
   3 |     
--------------------
ERROR: failed to solve: cog-hello-world-cog: failed to resolve source metadata for docker.io/library/cog-hello-world-cog:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Related issues:

  • https://github.com/replicate/cog/issues/300
  • https://github.com/replicate/cog/issues/1026
  • https://github.com/replicate/cog/issues/1105
  • https://github.com/replicate/cog/issues/1620

PR https://github.com/replicate/cog/pull/1621 was intended to fix this issue, but I think I have an Actions Run repro here that shows the issue persists.

cc @mattt

zeke avatar Apr 22 '24 23:04 zeke

https://github.com/replicate/cog/blob/fae2ac3d4226a2706dbbff32938c257bc9024c1d/pkg/docker/build.go#L18

v0.9.6 release may not include the change in PR https://github.com/replicate/cog/pull/1621

jinchanz avatar Apr 29 '24 08:04 jinchanz

v0.9.6 release may not include the change in PR #1621

That actions run is actually building Cog from source, rather than using a published release of Cog.

See https://github.com/zeke/hello-world-cog/actions/runs/8792119313/job/24127668946#step:4:924 and https://github.com/zeke/hello-world-cog/blob/e06e08a517d2bada370b94d8fa9355b882109249/.github/workflows/release.yml#L23-L26

zeke avatar Apr 29 '24 21:04 zeke

This is fixed in https://github.com/replicate/cog/releases/tag/v0.9.8

zeke avatar Jun 06 '24 14:06 zeke