123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #
- # Cookbook:: workstation
- # Recipe:: _podman
- #
- # Copyright:: 2022, The Authors, All Rights Reserved.
- apt_repository 'devel_kubic_libcontainer_stable' do
- arch 'amd64'
- uri 'http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/'
- distribution '/'
- deb_src true
- action :add
- end
- remote_file ::File.join(Chef::Config['file_cache_path'], 'devel_kubic_libcontainer_stable.key') do
- source 'https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Unstable/Release.key'
- action :create_if_missing
- end
- key_path = '/etc/apt/trusted.gpg.d'
- key_stable = ::File.join(key_path, 'devel_kubic_libcontainers_stable.gpg')
- execute 'GPG key for devel_kubic_libcontainer_stable' do
- command "cat #{::File.join(Chef::Config['file_cache_path'], 'devel_kubic_libcontainer_stable.key')} | gpg --dearmor | tee #{key_stable} > /dev/null"
- not_if { ::File.exist?(key_stable) }
- end
- package ['uidmap', 'fuse-overlayfs', 'containernetworking-plugins', 'slirp4netns', 'buildah']
- # Specific to WSL2:
- # Ref: https://www.redhat.com/sysadmin/podman-windows-wsl2
- #
- directory '/etc/containers/containers.conf.d' do
- owner 'root'
- group 'root'
- mode '0755'
- action :create
- end
- file '/etc/containers/containers.conf.d/99wsl2.conf' do
- owner 'root'
- group 'root'
- mode '0755'
- content <<~_WSL2
- [engine]
- cgroup_manager = "cgroupfs"
- events_logger = "file"
- _WSL2
- action :create
- end
|