From e7e3d3c326e48d0f985094b72ac7896ba0dafc9e Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Mon, 5 Jun 2023 00:32:21 +0200 Subject: [PATCH] Use podman to build when installed and configured I had problems when trying to build with podman with docker-compose 2.x, but it works when just calling the `podman build` command directly instead. --- script/diaspora-dev | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/script/diaspora-dev b/script/diaspora-dev index 18c4facda..65770048c 100755 --- a/script/diaspora-dev +++ b/script/diaspora-dev @@ -235,8 +235,15 @@ dia_get_db() { dia_build() { if [ $# -gt 0 ] && [ "$1" == "--no-cache" ]; then nocache="--no-cache"; fi + # Build the diaspora Docker container (diaspora:dev-latest) - dia_docker_compose build --pull $nocache diaspora + if command -v podman &> /dev/null && [[ "${DOCKER_HOST}" == *"podman"* ]]; then + # if podman is installed and DOCKER_HOST is set to podman, use `podman build` + podman build --build-arg DIA_UID=${DIASPORA_ROOT_UID} --build-arg DIA_GID=${DIASPORA_ROOT_GID} \ + --pull $nocache -t diaspora:dev-latest -f Dockerfile docker/develop + else + dia_docker_compose build --pull $nocache diaspora + fi } dia_pull() {