-
Notifications
You must be signed in to change notification settings - Fork 217
Description
@justincormack
The following is content prepared for ./implementors.md. While Docker Hub now supports OCI Image as a mediaType (yeah), it doesn't yet support additional medaiTypes, required to represent additional artifacts like Helm, Singularity and other development types.
Docker Hub
ORAS does not provide a default registry. Use the docker.io as the domain for docker hub.
Docker Hub does not yet accept null config files. It does accept empty config.json files with {} as the content.
Docker Hub does not yet accept mediaTypes beyond application/vnd.oci.image.config.v1+json which is reserved for container images that can be run with docker run and containerd run.
All artifacts pushed to docker hub will appear as oci images.
-
Authenticating with Docker Hub
oras login docker.io -u [user] -p [pwd]
-
Create an empty
config.json fileecho "{}" > config.json
-
Pushing Artifacts to Docker Hub
The following is the syntax that would indicate Docker Hub accepts OCI Artifacts as the
mediaType=application/vnd.unknown.config.v1. This currently fails.
oras push docker.io/youruser-org/orastest:1 \
--manifest-config config.json:application/vnd.unknown.config.v1+json \
./artifact.txt:application/vnd.unknown.layer.v1+txtThe following works, however it pushes the text file as an OCI image, indicating it would be supported by docker run, containerd run and scanned by security scanners. Which of course would fail.
oras push docker.io/youruser-org/orastest:1 \
--manifest-config config.json:application/vnd.oci.image.config.v1+json \
./artifact.txt:application/vnd.unknown.layer.v1+txt-
Pulling Artifacts from Docker Hub
oras pull docker.io/youruser-org/orastest:1