From b5a8036e4a7c77ee63133444b0c1fdb6e60d7e50 Mon Sep 17 00:00:00 2001 From: Josef Skladanka Date: Apr 14 2021 08:48:51 +0000 Subject: Merge #148 `Add tox-podman.sh helper script` --- diff --git a/README.md b/README.md index 48f855a..1f659f8 100644 --- a/README.md +++ b/README.md @@ -94,13 +94,10 @@ Should you, for some reason avoid docker, you could run the following command (w $ NO_CAN_HAS_POSTGRES=sadly pytest -To use tox-docker with podman without requiring root, you can use a local user -socket:: +To use tox-docker with podman without requiring root, you can use +`tox-podman.sh` script that wraps `tox`:: - $ systemctl --user start podman.socket - $ curl --unix-socket /run/user/$UID/podman/podman.sock http://localhost/_ping - $ export DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock - $ tox -e py39 + $ ./tox-podman.sh -e py39 ## Deployment diff --git a/tox-podman.sh b/tox-podman.sh new file mode 100755 index 0000000..754a6b8 --- /dev/null +++ b/tox-podman.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -euo pipefail + +export DOCKER_HOST=unix:///run/user/$UID/resultsdb-podman.sock +podman system service --time=0 "$DOCKER_HOST" & +trap "kill $!" QUIT TERM INT HUP EXIT +sleep 1 + +tox "$@"