From 7dfef036c75c6f85d0a2fd56adb3f36decb90505 Mon Sep 17 00:00:00 2001 From: Michael Herold Date: Thu, 31 Mar 2022 10:10:55 -0500 Subject: [PATCH] Support podman in macOS With [a fix][1] in [podman v3.4.3][2], these commands now work as expected in macOS. Potentially, it might make sense to version check podman to ensure that the minimum version is met, but I'm not sure that's needed because it's unlikely that people have an older version installed _and_ wish to use this tool. I'm unsure whether the commands work on Windows so I left the unsupported version there compiling with the negation of the supported flags. [1]: https://github.com/containers/podman/issues/12402 [2]: https://github.com/containers/podman/blob/4ba71f955a944790edda6e007e6d074009d437a7/RELEASE_NOTES.md#bugfixes-2 --- dive/image/podman/build.go | 2 +- dive/image/podman/cli.go | 2 +- dive/image/podman/{resolver_linux.go => resolver.go} | 2 ++ .../podman/{resolver_notlinux.go => resolver_unsupported.go} | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) rename dive/image/podman/{resolver_linux.go => resolver.go} (97%) rename dive/image/podman/{resolver_notlinux.go => resolver_unsupported.go} (93%) diff --git a/dive/image/podman/build.go b/dive/image/podman/build.go index bfebc49..617f146 100644 --- a/dive/image/podman/build.go +++ b/dive/image/podman/build.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux darwin package podman diff --git a/dive/image/podman/cli.go b/dive/image/podman/cli.go index 83523af..b909055 100644 --- a/dive/image/podman/cli.go +++ b/dive/image/podman/cli.go @@ -1,4 +1,4 @@ -// +build linux +// +build linux darwin package podman diff --git a/dive/image/podman/resolver_linux.go b/dive/image/podman/resolver.go similarity index 97% rename from dive/image/podman/resolver_linux.go rename to dive/image/podman/resolver.go index 592c038..a265d18 100644 --- a/dive/image/podman/resolver_linux.go +++ b/dive/image/podman/resolver.go @@ -1,3 +1,5 @@ +// +build linux darwin + package podman import ( diff --git a/dive/image/podman/resolver_notlinux.go b/dive/image/podman/resolver_unsupported.go similarity index 93% rename from dive/image/podman/resolver_notlinux.go rename to dive/image/podman/resolver_unsupported.go index 8dfdd22..c49c522 100644 --- a/dive/image/podman/resolver_notlinux.go +++ b/dive/image/podman/resolver_unsupported.go @@ -1,4 +1,4 @@ -// +build !linux +// +build !linux,!darwin package podman