I have to build my container images in OCI (Open Container Initiative) format. I have Linux and Windows Containers. If I do the following with podman the manifest is "application/vnd.oci.image.manifest.v1+json":
podman build -t webapi:latest -f ./src/webapi/Dockerfile ./src/webapi
podman tag webapi:latest registry.gitlab.com/acme/sub/webapi:latest
podman push registry.gitlab.com/acme/sub/webapi:latest
podman pull registry.gitlab.com/acme/sub/webapi:latest
podman image inspect registry.gitlab.com/acme/sub/webapi:latest|grep Manifest
# => application/vnd.oci.image.manifest.v1+json
When I do the build with docker the manifest is "application/vnd.docker.distribution.manifest.v2+json":
docker build -t webapi:latest -f ./src/webapi/Dockerfile ./src/webapi
docker tag webapi:latest registry.gitlab.com/acme/sub/webapi:latest
docker push registry.gitlab.com/acme/sub/webapi:latest
podman pull registry.gitlab.com/acme/sub/webapi:latest
podman image inspect registry.gitlab.com/acme/sub/webapi:latest|grep Manifest
# => application/vnd.docker.distribution.manifest.v2+json
For my windows containers I can not use podman.
The main question is: How can I create an OCI windows container and push it in a registry?
Other questions are:
- How can I check if an image is an OCI image?
- Can I use "docker buildx" to create an OCI image? And how can I push it?
- Can I build an Windows image with different tools?
- Does it make sense to create an OCI Windows image?