From 70049b03e0096bb1e5e99baf3eba45dd9644627f Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Sat, 20 Mar 2021 14:14:00 -0700 Subject: [PATCH 1/3] Issue 530: Fix container engine detection when podman-docker installed --- src/docker.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docker.rs b/src/docker.rs index 2b6412304..e54dc6464 100644 --- a/src/docker.rs +++ b/src/docker.rs @@ -20,8 +20,8 @@ fn get_container_engine() -> Result { let container_engine = env::var("CROSS_CONTAINER_ENGINE").unwrap_or_default(); if container_engine.is_empty() { - which::which(DOCKER) - .or_else(|_| which::which(PODMAN)) + which::which(PODMAN) + .or_else(|_| which::which(DOCKER)) .map_err(|e| e.into()) } else { which::which(container_engine).map_err(|e| e.into()) From 42cf98f9453e66941894b53378b3e303fcb2dc36 Mon Sep 17 00:00:00 2001 From: Alex Huszagh Date: Sun, 29 May 2022 06:53:54 -0500 Subject: [PATCH 2/3] Updated CHANGELOG. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c13af3c9e..3e4c591d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - #588 - fix ci: bump openssl version in freebsd again - #552 - Added CHANGELOG.md automation - #543 - Added environment variables to control the UID and GID in the container +- #538 - changed default container engine to podman - #534 - fix image builds with update of dependencies - #524 - docker: Add Nix Store volume support - #502 - fix ci: bump openssl version in freebsd From cf9991b60fa2055f78db963bcfdfebdbcda28405 Mon Sep 17 00:00:00 2001 From: Alexander Huszagh Date: Tue, 31 May 2022 17:40:58 -0500 Subject: [PATCH 3/3] Only default to podman on Linux --- src/docker.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/docker.rs b/src/docker.rs index 81d70a85b..3639e87af 100644 --- a/src/docker.rs +++ b/src/docker.rs @@ -18,8 +18,10 @@ const PODMAN: &str = "podman"; fn get_container_engine() -> Result { if let Ok(ce) = env::var("CROSS_CONTAINER_ENGINE") { which::which(ce) - } else { + } else if cfg!(target_os = "linux") { which::which(PODMAN).or_else(|_| which::which(DOCKER)) + } else { + which::which(DOCKER).or_else(|_| which::which(PODMAN)) } }