diff --git a/devops/clean b/devops/clean index ce7be26db6..f49e2b9aba 100755 --- a/devops/clean +++ b/devops/clean @@ -5,6 +5,14 @@ set -e set -u +USE_PODMAN="${USE_PODMAN:-}" + +# Allow opting into using podman with USE_PODMAN=1 +if [[ -n "${USE_PODMAN}" ]]; then + DOCKER_BIN="podman" +else + DOCKER_BIN="docker" +fi function remove_unwanted_files() { @@ -37,8 +45,8 @@ function remove_unwanted_files() { build/*.deb # Remove any Onion URL from make dev-tor - if docker volume inspect sd-onion-services > /dev/null; then - docker volume remove sd-onion-services + if $DOCKER_BIN volume inspect sd-onion-services > /dev/null; then + $DOCKER_BIN volume remove sd-onion-services fi # Remove extraneous copies of the git repos, pulled in diff --git a/securedrop/bin/dev-shell b/securedrop/bin/dev-shell index 35caccce99..8758dc7420 100755 --- a/securedrop/bin/dev-shell +++ b/securedrop/bin/dev-shell @@ -116,7 +116,7 @@ function docker_run() { if [ -n "${USE_TOR:-}" ]; then # Mount persistent onion services - docker volume create sd-onion-services + $DOCKER_BIN volume inspect sd-onion-services -f " " || $DOCKER_BIN volume create sd-onion-services DOCKER_RUN_ARGUMENTS="${DOCKER_RUN_ARGUMENTS} --volume sd-onion-services:/var/lib/tor/services" fi