_podman.rb 1012 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # Cookbook:: workstation
  3. # Recipe:: _podman
  4. #
  5. # Copyright:: 2022, The Authors, All Rights Reserved.
  6. remote_file ::File.join(Chef::Config['file_cache_path'], 'devel_kubic_libcontainer_stable.key') do
  7. source 'https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_Unstable/Release.key'
  8. action :delete
  9. end
  10. key_path = '/etc/apt/trusted.gpg.d'
  11. key_stable = ::File.join(key_path, 'devel_kubic_libcontainers_stable.gpg')
  12. file key_stable do
  13. action :delete
  14. end
  15. apt_repository 'devel_kubic_libcontainer_stable' do
  16. arch 'amd64'
  17. uri 'http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/'
  18. distribution '/'
  19. deb_src true
  20. action :delete
  21. end
  22. package %w{
  23. podman
  24. uidmap
  25. fuse-overlayfs
  26. containernetworking-plugins
  27. slirp4netns
  28. buildah
  29. }
  30. # Specific to WSL2:
  31. # Ref: https://www.redhat.com/sysadmin/podman-windows-wsl2
  32. #
  33. directory '/etc/containers/containers.conf.d' do
  34. owner 'root'
  35. group 'root'
  36. mode '0755'
  37. action :create
  38. end