Skip to content

Commit

Permalink
Produce docker format containers by default
Browse files Browse the repository at this point in the history
podman, unlike docker, defaults to oci. Allow setting that as well
but default to be docker compatible with allowing the docker
extensions.
  • Loading branch information
dirkmueller committed Sep 20, 2023
1 parent 52cf997 commit d4bd333
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build-recipe-docker
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ recipe_build_docker() {

if test "$BUILDENGINE" = podman; then
test -n "$squashopt" && squashopt="--layers=false"
if ! $DOCKER_CMD build $squashopt -v "$TOPDIR/SOURCES/repos:$TOPDIR/SOURCES/repos" --network=host "${tagargs[@]}" "${buildargs[@]}" -f "$TOPDIR/SOURCES/$RECIPEFILE" $TOPDIR/SOURCES/ ; then
buildformat=$(queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" buildflags+ buildformat)
formatopt="--format docker"
if test -n "$buildformat" -a "$buildformat" = "oci"; then
formatopt="--format oci"
fi
if ! $DOCKER_CMD build $formatopt $squashopt -v "$TOPDIR/SOURCES/repos:$TOPDIR/SOURCES/repos" --network=host "${tagargs[@]}" "${buildargs[@]}" -f "$TOPDIR/SOURCES/$RECIPEFILE" $TOPDIR/SOURCES/ ; then
cleanup_and_exit 1 "$DOCKER_TOOL build command failed"
fi
else
Expand Down

0 comments on commit d4bd333

Please sign in to comment.