Skip to content

Commit

Permalink
Support podman in make dev-tor
Browse files Browse the repository at this point in the history
Unfortunately `podman volume` and `docker volume` are not identical,
podman will (sensibly) error if you try to create a volume that already
exists unless you pass `--ignore`, which docker doesn't support.

So we conditionally add the needed flag depending on which tool we're
using.
  • Loading branch information
legoktm committed May 29, 2024
1 parent 626f35b commit c9448ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion securedrop/bin/dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ function docker_run() {

if [ -n "${USE_TOR:-}" ]; then
# Mount persistent onion services
docker volume create sd-onion-services
# shellcheck disable=SC2046
$DOCKER_BIN volume create sd-onion-services $(if [ "$DOCKER_BIN" = "podman" ]; then echo "--ignore"; fi)
DOCKER_RUN_ARGUMENTS="${DOCKER_RUN_ARGUMENTS} --volume sd-onion-services:/var/lib/tor/services"
fi

Expand Down

0 comments on commit c9448ca

Please sign in to comment.