docker buildx build has an --output flag that can be set to docker or you can use --load as shortform to create an image with a media type docker according to docker buildx build | Docker Docs
- The default drive exports an OCI image, if you want to export
docker image layout, you need to use a docker-container driver according to OCI and Docker exporters | Docker Docs
- To create a
docker-container driver according to the official docs (sorry I can only post two links ):
docker buildx create \
--name container \
--driver=docker-container \
--driver-opt=[key=value,...]
container
- Afterwards, you can use the new built driver like this:
docker buildx build -t <image> --builder=container