Skip to content

Commit

Permalink
Merge pull request freedomofpress#7163 from freedomofpress/podman-volume
Browse files Browse the repository at this point in the history
Support podman in `make dev-tor`
  • Loading branch information
legoktm authored Dec 20, 2024
2 parents 0ba1208 + c613f62 commit 3918eaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions devops/clean
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion securedrop/bin/dev-shell
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,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

Expand Down

0 comments on commit 3918eaf

Please sign in to comment.