Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try pushing to docker hub and fail #7

Open
owenthereal opened this issue Apr 2, 2020 · 5 comments
Open

Try pushing to docker hub and fail #7

owenthereal opened this issue Apr 2, 2020 · 5 comments

Comments

@owenthereal
Copy link

Is pushing to docker hub supported?

wasm-to-oci --log debug push target/wasm32-wasi/debug/hello-world-rust.wasm docker.io/jingweno/wasm:1234
Error: failed commit on ref "manifest-sha256:beb9a5b4269a91d4f6abb5d7c7c0e60bc0db2b90f38cac467aa9866791e73b1e": unexpected status: 403 Forbidden
Usage:
  wasm-to-oci push <module> <reference> [options] [flags]

Flags:
  -h, --help   help for push
      --sign   Signs the WebAssembly module and pushes the metadata to a trust server

Global Flags:
  -d, --dir string         Directory where the trust data is persisted to (default "/Users/jou/.wasm-to-oci")
      --insecure           allow connections to SSL registry without certs
      --log string         Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")
      --server string      The trust server used (default "https://notary.docker.io")
  -t, --timeout string     Timeout for the trust server (default "5s")
      --tlscacert string   Trust certs signed only by this CA
      --use-http           use plain http and not https
@fleeto
Copy link

fleeto commented Apr 10, 2020

I had the same problem.

@owenthereal
Copy link
Author

I just checked, pushing to ECR is supported. Perhaps docker hub behaves a bit differently.

$ wasm-to-oci push ./target/wasm32-wasi/debug/hello-world-rust.wasm 215737051855.dkr.ecr.us-west-2.amazonaws.com/wasm:latest

INFO[0001] Pushed: 215737051855.dkr.ecr.us-west-2.amazonaws.com/wasm:latest
INFO[0001] Size: 2149229
INFO[0001] Digest: sha256:408202b2f3b087ab6ba05c6c59b8a94bb97b45c62275bfb2803001d0f7eb82f0

@radu-matei
Copy link
Member

radu-matei commented Apr 25, 2020

Yes, currently Docker Hub actively rejects media types outside of a clearly defined list - I also updated the readme to clearly state that pushing to Docker Hub is indeed expected to fail.

(For a bit more context, this project expects the registry to allow arbitrary artifacts - as described by the proposed OCI Artifacts proposal. Given that the proposal is fairly new, it is indeed expected that, unless explicitly tested, a registry will actively reject unknown media types, and so will reject WebAssembly modules.)

We have tested this implementation extensively with the upstream Docker Distribution project and Azure Container Registry - thanks a lot for testing ECR, I will also give it a go and update the readme.

@TBBle
Copy link

TBBle commented Nov 9, 2022

Might be worth retrying this, given https://www.docker.com/blog/announcing-docker-hub-oci-artifacts-support/, and following up at docker/roadmap#135 if there's any remaining blockers.

@creslinux
Copy link

creslinux commented Jan 9, 2024

this works now, here i pushed a rust wasm http service

wasm-to-oci push target/wasm32-wasi/release/server.wasm docker.io/creslin/http-rust:1

returns

INFO[0002] Pushed: docker.io/creslin/http-rust:1        
INFO[0002] Size: 3293493                                
INFO[0002] Digest: sha256:c8a60556394d05faad0fef32f847d444ef489e5493ea63d1e564cf5822e194f7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants