From 03e926081ed1b657f3881332829a9d893be44cbe 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 8df633a20..d3dbbc9a0 100644 --- a/tasks/build.rake +++ b/tasks/build.rake @@ -49,27 +49,27 @@ DEP_BUILD_ORDER = [ ].freeze def image_exists - !`docker images -q #{@image}`.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 @@ -88,7 +88,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 = {}