Skip to content

Commit

Permalink
add option to run container with --cgroupns=host (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewhammond authored Dec 19, 2022
1 parent a26b48b commit 94dbda8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/kitchen/driver/dokken.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Dokken < Kitchen::Driver::Base
default_config :binds, []
default_config :cap_add, nil
default_config :cap_drop, nil
default_config :cgroupns_host, false
default_config :chef_image, "chef/chef"
default_config :chef_version, "latest"
default_config :data_image, "dokken/kitchen-cache:latest"
Expand Down Expand Up @@ -330,6 +331,9 @@ def start_runner_container(state)
unless self[:entrypoint].to_s.empty?
config["Entrypoint"] = self[:entrypoint]
end
if self[:cgroupns_host]
config["HostConfig"]["CgroupnsMode"] = "host"
end
if self[:userns_host]
config["HostConfig"]["UsernsMode"] = "host"
end
Expand Down

0 comments on commit 94dbda8

Please sign in to comment.