Skip to content

Commit

Permalink
Use BuildKit's option to not tar the output image as OCI layout as we…
Browse files Browse the repository at this point in the history
… need it as a directory anyway
  • Loading branch information
SaschaSchwarze0 committed Aug 22, 2023
1 parent 224aea7 commit dafd7a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions samples/buildstrategy/buildkit/buildstrategy_buildkit_cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ spec:
echo "set -euo pipefail" >> /tmp/run.sh
echo "buildctl-daemonless.sh \\" >> /tmp/run.sh
echo "build \\" >> /tmp/run.sh
echo "--progress=plain \\" >> /tmp/run.sh
echo "--frontend=dockerfile.v0 \\" >> /tmp/run.sh
echo "--opt=filename=\"${DOCKERFILE_NAME}\" \\" >> /tmp/run.sh
echo "--local=context=\"${PARAM_SOURCE_CONTEXT}\" \\" >> /tmp/run.sh
echo "--local=dockerfile=\"${DOCKERFILE_DIR}\" \\" >> /tmp/run.sh
echo "--output=type=oci \\" >> /tmp/run.sh
echo "--output=type=oci,tar=false,dest=\"${PARAM_OUTPUT_DIRECTORY}\" \\" >> /tmp/run.sh
if [ "${PARAM_CACHE}" == "registry" ]; then
echo "--export-cache=type=inline \\" >> /tmp/run.sh
echo "--import-cache=type=registry,ref=\"${PARAM_OUTPUT_IMAGE}\",registry.insecure=\"${PARAM_OUTPUT_INSECURE}\" \\" >> /tmp/run.sh
Expand Down Expand Up @@ -154,7 +153,7 @@ spec:
echo "--opt=\"platform=${platforms}\" \\" >> /tmp/run.sh
fi
echo "--metadata-file /tmp/image-metadata.json | tar -C \"${PARAM_OUTPUT_DIRECTORY}\" -xf -" >> /tmp/run.sh
echo "--progress=plain" >> /tmp/run.sh
chmod +x /tmp/run.sh
/tmp/run.sh
Expand Down

0 comments on commit dafd7a1

Please sign in to comment.