You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actual behavior
I am building an image FROM scratch with Kaniko and I can only get Docker Images (manifest mediaType is application/vnd.docker.distribution.manifest.v2+json).
Expected behavior
Default image format is OCI (manifest mediaType is application/vnd.oci.image.manifest.v1+json), because the Docker format is considered to be obsolete, or there is an argument to select the format explicitly.
To Reproduce
Steps to reproduce the behavior (👀 please notice files and scripts provided below for easy reproduction):
Create a Dockerfile to build an image from scratch.
Build the image with Kaniko. An example created with Kaniko using the scripts and files provided below is available under the reference ghcr.io/silvanoc/kaniko-scratch:latest.
Get the manifest with regctl manifest get ... or skopeo inspect --all .... Look at the files and scripts provided below to run these commands.
#!/usr/bin/env bashif which regctl >/dev/null ;then
regctl manifest get \
--format raw-body \
ghcr.io/silvanoc/kaniko-scratch:latest \
| jq -r '.mediaType'elif which skopeo >/dev/null ;then
skopeo inspect \
--raw docker://ghcr.io/silvanoc/kaniko-scratch:latest \
| jq -r '.mediaType'elseecho"You need either regctl or skopeo to run this command"exit 1
fi
Triage Notes for the Maintainers
Description
Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
The text was updated successfully, but these errors were encountered:
Actual behavior
I am building an image
FROM scratch
with Kaniko and I can only get Docker Images (manifest mediaType isapplication/vnd.docker.distribution.manifest.v2+json
).Expected behavior
Default image format is OCI (manifest mediaType is
application/vnd.oci.image.manifest.v1+json
), because the Docker format is considered to be obsolete, or there is an argument to select the format explicitly.To Reproduce
Steps to reproduce the behavior (👀 please notice files and scripts provided below for easy reproduction):
Dockerfile
to build an image from scratch.ghcr.io/silvanoc/kaniko-scratch:latest
.regctl manifest get ...
orskopeo inspect --all ...
. Look at the files and scripts provided below to run these commands.Additional Information
The root-cause of this issue is in one of the libraries. See google/go-containerregistry#2012 for more information.
docker build ...
creates an OCI image, as expected.+ Dockerfile
+ hello
(empty file)Files and scripts to reproduce
Dockerfile
push-kaniko.bash
get-manifest-mediatype.bash
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: