Skip to content

Commit 6d8f542

Browse files
committed
Add Podman check to #running_in_container?
This solves the issue of running Selenium tests on Arm Mac (via Podman Desktop), among other issues.
1 parent 09bda7f commit 6d8f542

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/berkeley_library/docker.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module BerkeleyLibrary
77
module Docker
88
class << self
99
def running_in_container?
10-
File.exist?('/.dockerenv') || init_cgroup_is_dockerish?
10+
File.exist?('/.dockerenv') || init_cgroup_is_dockerish? || env_is_podmanish?
1111
end
1212

1313
private
@@ -19,6 +19,10 @@ def init_cgroup_is_dockerish?
1919
false
2020
end
2121
end
22+
23+
def env_is_podmanish?
24+
ENV.fetch('container', '') == 'podman'
25+
end
2226
end
2327
end
2428
end

0 commit comments

Comments
 (0)