Open owenthereal opened 4 years ago
I had the same problem.
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
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.
Might be worth retrying this, given https://www.docker.com/blog/announcing-docker-hub-oci-artifacts-support/, and following up at https://github.com/docker/roadmap/issues/135 if there's any remaining blockers.
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
Is pushing to docker hub supported?