Skip to content

Commit

Permalink
fixup! rjeffman: this is a fixup for infra/images/build.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rjeffman committed Jul 20, 2024
1 parent d48b9f1 commit f98ac5c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions infra/image/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,15 @@ container_state="$(podman ps -q --all --format "{{.State}}" --filter "name=${nam

if [ "${REBUILD}" == "Y" ] || [ -z "${container_state}" ]
then
log info "= Cleanup possible existing ${DISTRO} ="
podman image rm "${DISTRO}" --force
echo
# in older (as in Ubuntu 22.04) podman versions,
# 'podman image rm --force' fails if the image
# does not exist.
if podman image exist "${DISTRO}"
then
log info "= Cleanup possible existing ${DISTRO} ="
podman image rm "${DISTRO}" --force
echo
fi

log info "= Building ${DISTRO} ="
podman build -t "${DISTRO}" -f "${BASEDIR}/dockerfile/${DISTRO}" \
Expand Down

0 comments on commit f98ac5c

Please sign in to comment.