Describe the bug
I am using buildkit to build my image and then using crane to authenticate to a registry and push the image.
Here are some docs about the buildctl build command, specifically, the output option.
The command I am running to build the image is:
buildctl build \
--frontend dockerfile.v0 \
--local context=. \
--local dockerfile=. \
--output type=oci,dest=my-image.tar
This creates a my-image.tar OCI tarball file in the current working directory.
I am then authenticating to a private AWS ECR using aws ecr get-login-password --region ${region} | crane auth login --username AWS --password-stdin ${ecrRegistryUrl}") and attempting to run crane push my-image.tar ${ecrRegistryUrl}/my-repo/my-image:latest, but I get an error: Error: loading my-image.tar as tarball: file manifest.json not found in tar
To Reproduce
- Install
buildkit/buildctl for whatever OS you run.
- Install
crane
- Build an image using
buildctl build ... and make sure to save it as an OCI tarball using the flags --output type=oci,dest=my-image-tarball.tar
- Attempt to push the image using
crane push
Expected behavior
I would expect the crane push to work is all.
Anything else
Describe the bug
I am using
buildkitto build my image and then usingcraneto authenticate to a registry and push the image.Here are some docs about the
buildctl buildcommand, specifically, theoutputoption.The command I am running to build the image is:
This creates a
my-image.tarOCI tarball file in the current working directory.I am then authenticating to a private AWS ECR using
aws ecr get-login-password --region ${region} | crane auth login --username AWS --password-stdin ${ecrRegistryUrl}")and attempting to runcrane push my-image.tar ${ecrRegistryUrl}/my-repo/my-image:latest, but I get an error:Error: loading my-image.tar as tarball: file manifest.json not found in tarTo Reproduce
buildkit/buildctlfor whatever OS you run.cranebuildctl build ...and make sure to save it as an OCI tarball using the flags--output type=oci,dest=my-image-tarball.tarcrane pushExpected behavior
I would expect the
crane pushto work is all.Anything else