From a63b99cc103749a9568ff4b4bc3bddd7e1fbd7d8 Mon Sep 17 00:00:00 2001 From: Greg NISBET Date: Mon, 23 Mar 2026 14:20:10 -0700 Subject: [PATCH] Support podman in tasks/build.rake Support podman in addition to docker in tasks/build.rake via the DOCKER environment variable. Signed-off-by: Greg NISBET --- tasks/build.rake | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/build.rake b/tasks/build.rake index 98e0c9435..8044dc615 100644 --- a/tasks/build.rake +++ b/tasks/build.rake @@ -48,27 +48,27 @@ DEP_BUILD_ORDER = [ ].freeze def image_exists - !`docker images -q #{@image} --format='{{json .ID}}'`.strip.empty? + !`${DOCKER_BIN-docker} images -q #{@image} --format='{{json .ID}}'`.strip.empty? end def container_exists - !`docker container ls --all --filter 'name=#{@container}' --format '{{json .ID}}'`.strip.empty? + !`${DOCKER_BIN-docker} container ls --all --filter 'name=#{@container}' --format '{{json .ID}}'`.strip.empty? end def teardown if container_exists puts "Stopping #{@container}" - run_command("docker stop #{@container}", silent: false, print_command: true) - run_command("docker rm #{@container}", silent: false, print_command: true) + run_command("${DOCKER_BIN-docker} stop #{@container}", silent: false, print_command: true) + run_command("${DOCKER_BIN-docker} rm #{@container}", silent: false, print_command: true) end end def start_container(ezbake_dir) - run_command("docker run -d --name #{@container} -v .:/code -v #{ezbake_dir}:/deps #{@image} /bin/sh -c 'tail -f /dev/null'", silent: false, print_command: true) + run_command("${DOCKER_BIN-docker} run -d --name #{@container} -v .:/code -v #{ezbake_dir}:/deps #{@image} /bin/sh -c 'tail -f /dev/null'", silent: false, print_command: true) end def run(cmd) - run_command("docker exec #{@container} /bin/bash --login -c '#{cmd}'", silent: false, print_command: true) + run_command("${DOCKER_BIN-docker} exec #{@container} /bin/bash --login -c '#{cmd}'", silent: false, print_command: true) end namespace :vox do @@ -87,7 +87,7 @@ namespace :vox do # delete all containers and do `docker rmi ezbake-builder` unless image_exists puts "Building ezbake-builder image" - run_command("docker build -t ezbake-builder .", silent: false, print_command: true) + run_command("${DOCKER_BIN-docker} build -t ezbake-builder .", silent: false, print_command: true) end libs_to_build_manually = {}