Hi,
Would you be so kind to advise how one can export a container’s image to a .tar file in the OCI format?
- without running a container
- with whatever tool you wish
Below 1) is an attempt, but how to verify it? 2) is based on Exporters overview | Docker Docs, but am trying to understand the difference between the two commands
1)
docker export $(docker create <image-name>) | tar -xC <filename>
2)
docker buildx build --output type=oci,dest=filename.tar .
docker buildx build --output type=tar,dest=pathname .