From 8fb695503e2bcb2e3b9ad731417b472c64df2031 Mon Sep 17 00:00:00 2001 From: Harry Pidcock Date: Fri, 6 Oct 2023 15:57:15 +1000 Subject: [PATCH] Use podman if it is installed. Fix DOCKER_USERNAME for podman. --- Makefile | 4 ++-- make_functions.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3dcaa884a4a..47294d20be4 100644 --- a/Makefile +++ b/Makefile @@ -453,8 +453,8 @@ check-deps: # CAAS related targets -export OCI_BUILDER ?= docker -DOCKER_USERNAME ?= jujusolutions +export OCI_BUILDER ?= $(shell (which podman 2>&1 > /dev/null && echo podman) || echo docker ) +DOCKER_USERNAME ?= docker.io/jujusolutions DOCKER_BUILDX_CONTEXT ?= juju-make DOCKER_STAGING_DIR ?= ${BUILD_DIR}/docker-staging JUJUD_STAGING_DIR ?= ${DOCKER_STAGING_DIR}/jujud-operator diff --git a/make_functions.sh b/make_functions.sh index 29accabc458..eeba157b49f 100755 --- a/make_functions.sh +++ b/make_functions.sh @@ -12,7 +12,7 @@ JUJU_BUILD_NUMBER=${JUJU_BUILD_NUMBER:-} # Docker variables OCI_BUILDER=${OCI_BUILDER:-docker} -DOCKER_USERNAME=${DOCKER_USERNAME:-jujusolutions} +DOCKER_USERNAME=${DOCKER_USERNAME:-docker.io/jujusolutions} DOCKER_BUILDX_CONTEXT=${DOCKER_BUILDX_CONTEXT:-juju-make} DOCKER_STAGING_DIR="${BUILD_DIR}/docker-staging" DOCKER_BIN=${DOCKER_BIN:-$(which ${OCI_BUILDER} || true)}