From ad2b895c640fde19e289a71101914b5f5aac4411 Mon Sep 17 00:00:00 2001 From: Dario Gonzalez Date: Tue, 6 Jun 2023 01:07:39 -0700 Subject: [PATCH 01/32] Expose docker tmpfs mounts through the container resource (#1250) Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Dario Gonzalez --- documentation/docker_container.md | 13 ++++++++++++- resources/container.rb | 2 ++ spec/docker_test/container_spec.rb | 10 ++++++++++ spec/libraries/container_spec.rb | 6 +++--- test/cookbooks/docker_test/recipes/container.rb | 12 ++++++++++++ .../resources/inspec/assert_functioning_spec.rb | 7 +++++++ 6 files changed, 46 insertions(+), 4 deletions(-) diff --git a/documentation/docker_container.md b/documentation/docker_container.md index e60686d7ba..219671b740 100644 --- a/documentation/docker_container.md +++ b/documentation/docker_container.md @@ -45,7 +45,7 @@ Most `docker_container` properties are the `snake_case` version of the `CamelCas - `health_check` - A hash containing the health check options - [healthcheck reference](https://docs.docker.com/engine/reference/run/#healthcheck) - `host` - A string containing the host the API should communicate with. Defaults to ENV['DOCKER_HOST'] if set - `host_name` - The hostname for the container. -- `labels` A string, array, or hash to set metadata on the container in the form ['foo:bar', 'hello:world']` +- `labels` A string, array, or hash to set metadata on the container in the form `['foo:bar', 'hello:world']` - `links` - An array of source container/alias pairs to link the container to in the form `[container_a:www', container_b:db']` - `log_driver` - Sets a custom logging driver for the container (json-file/syslog/journald/gelf/fluentd/awslogs/splunk/etwlogs/gcplogs/logentries/loki-docker/local/none). - `log_opts` - Configures the above logging driver options (driver-specific). @@ -88,6 +88,7 @@ Most `docker_container` properties are the `snake_case` version of the `CamelCas - `tls_ca_cert` - Trust certs signed only by this CA. Defaults to ENV['DOCKER_CERT_PATH'] if set - `tls_client_cert` - Path to TLS certificate file for docker cli. Defaults to ENV['DOCKER_CERT_PATH'] if set - `tls_client_key` - Path to TLS key file for docker cli. Defaults to ENV['DOCKER_CERT_PATH'] if set +- `tmpfs` - A hash of paths to tmpfs options. Defaults to `{}`. - `userns_mode` - Modify the user namespace mode - Defaults to `nil`, example option: `host` - `pid_mode` - Set the PID (Process) Namespace mode for the container. `host`: use the host's PID namespace inside the container. - `ipc_mode` - Set the IPC mode for the container - Defaults to `nil`, example option: `host` @@ -277,6 +278,16 @@ docker_container 'ohai_debian' do end ``` +### Mount a tmpfs at a given directory in the container + +```ruby +docker_container 'tmp_db' do + command '/bin/run_db.sh' + tmpfs { '/var/lib/db_data' => 'rw,size=2g' } + action :run +end +``` + ### Set a container's entrypoint ```ruby diff --git a/resources/container.rb b/resources/container.rb index 36a2edee8f..94c63b0216 100644 --- a/resources/container.rb +++ b/resources/container.rb @@ -64,6 +64,7 @@ property :stdin_once, [true, false], default: false, desired_state: false property :sysctls, Hash, default: {} property :timeout, Integer, desired_state: false +property :tmpfs, Hash, default: {} property :tty, [true, false], default: false property :ulimits, [Array, nil], coerce: proc { |v| coerce_ulimits(v) } property :user, String @@ -510,6 +511,7 @@ def load_container_labels 'SecurityOpt' => new_resource.security_opt, 'ShmSize' => new_resource.shm_size, 'Sysctls' => new_resource.sysctls, + 'Tmpfs' => new_resource.tmpfs, 'Ulimits' => ulimits_to_hash, 'UsernsMode' => new_resource.userns_mode, 'UTSMode' => new_resource.uts_mode, diff --git a/spec/docker_test/container_spec.rb b/spec/docker_test/container_spec.rb index 41beaad5da..6263ee42f9 100644 --- a/spec/docker_test/container_spec.rb +++ b/spec/docker_test/container_spec.rb @@ -288,6 +288,16 @@ end end + context 'testing tmpfs_mounter' do + it 'run_if_missing_docker_container[tmpfs_mounter]' do + expect(chef_run).to run_if_missing_docker_container('tmpfs_mounter').with( + repo: 'busybox', + command: ['df', '-h', '/tmpfs_dir'], + tmpfs: { '/tmpfs_dir' => 'rw,size=10m' } + ) + end + end + context 'testing volumes_from' do it 'creates directory[/chefbuilder]' do expect(chef_run).to create_directory('/chefbuilder').with( diff --git a/spec/libraries/container_spec.rb b/spec/libraries/container_spec.rb index ee84097713..8254b492f2 100644 --- a/spec/libraries/container_spec.rb +++ b/spec/libraries/container_spec.rb @@ -71,7 +71,7 @@ expect { chef_run }.to_not raise_error expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } ) } end @@ -98,7 +98,7 @@ expect { chef_run }.to_not raise_error expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } }, 'Healthcheck' => { 'Test' => ['string'], 'Interval' => 0, 'Timeout' => 0, 'Retries' => 0, 'StartPeriod' => 0 } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } }, 'Healthcheck' => { 'Test' => ['string'], 'Interval' => 0, 'Timeout' => 0, 'Retries' => 0, 'StartPeriod' => 0 } } ) } end @@ -117,7 +117,7 @@ expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', # Should be missing 'MemorySwappiness' - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } ) } end diff --git a/test/cookbooks/docker_test/recipes/container.rb b/test/cookbooks/docker_test/recipes/container.rb index 8993a73bc6..eb183acbf9 100644 --- a/test/cookbooks/docker_test/recipes/container.rb +++ b/test/cookbooks/docker_test/recipes/container.rb @@ -290,6 +290,18 @@ action :run_if_missing end +####### +# tmpfs +####### + +# docker inspect -f "{{ .HostConfig.Tmpfs }}" +docker_container 'tmpfs_mounter' do + repo 'busybox' + command 'df -h /tmpfs_dir' + tmpfs '/tmpfs_dir' => 'rw,size=10m' + action :run_if_missing +end + ############## # volumes_from ############## diff --git a/test/integration/resources/inspec/assert_functioning_spec.rb b/test/integration/resources/inspec/assert_functioning_spec.rb index f3e02ec4fc..7ae9f23414 100644 --- a/test/integration/resources/inspec/assert_functioning_spec.rb +++ b/test/integration/resources/inspec/assert_functioning_spec.rb @@ -315,6 +315,13 @@ its(:stdout) { should match(%r{\/summer\:\{\}}) } end +# docker_container[tmpfs_mounter] + +describe command('docker inspect -f "{{ .HostConfig.Tmpfs }}" tmpfs_mounter') do + its(:exit_status) { should eq 0 } + its(:stdout) { should match('/tmpfs.*10.0m.*tmpfs_dir/') } +end + # docker_container[chef_container] describe docker_container('chef_container') do From 8b80d14370b912040a287462384fd3166fd7650c Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Tue, 6 Jun 2023 09:07:43 +0100 Subject: [PATCH 02/32] Update changelog for 11.1.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d5e8a6809..7275fdddfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.1.0 - *2023-06-06* ## 11.0.1 - *2023-06-01* From ba533095bd82cfff54a967d40e6838aa8cbccba6 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Tue, 6 Jun 2023 09:07:43 +0100 Subject: [PATCH 03/32] Update metadata for 11.1.0 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index e805be8a84..0a12f40b58 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.0.1' +version '11.1.0' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From 778a34a9083768f0a9001cacad958e5e8cac992b Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Tue, 6 Jun 2023 09:07:46 +0100 Subject: [PATCH 04/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7275fdddfb..c7e6de182c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.1.0 - *2023-06-06* ## 11.0.1 - *2023-06-01* From b35983f27b2fb8b7421d852562df0bc2b4d01d33 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 11:34:00 +0000 Subject: [PATCH 05/32] Update sous-chefs/.github digest to 3b1d4d5 (#1251) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2525accee..4ccb1c2121 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ name: ci jobs: lint-unit: - uses: sous-chefs/.github/.github/workflows/lint-unit.yml@89865ee56cd1c401b2e758f3b82cafab834ca9f7 + uses: sous-chefs/.github/.github/workflows/lint-unit.yml@3b1d4d5be742044535931b5b78afe84f4b94d7fa permissions: actions: write checks: write From 4ee517021093b0dbac8bc89b610001d9a5b69b6c Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:34:04 +0100 Subject: [PATCH 06/32] Update changelog for 11.1.1 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7e6de182c..a3670a4f0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.1.1 - *2023-07-10* ## 11.1.0 - *2023-06-06* From f6ad6c38a813bdd5be315fa29ac3e5615256fec6 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:34:04 +0100 Subject: [PATCH 07/32] Update metadata for 11.1.1 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 0a12f40b58..e01eabb4de 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.1.0' +version '11.1.1' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From a3599c49dc39e79ed92a8b370f33eacdb8c31a23 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:34:07 +0100 Subject: [PATCH 08/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3670a4f0b..d6f68fc119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.1.1 - *2023-07-10* ## 11.1.0 - *2023-06-06* From 1c87ab654283a77e9334a9edef23bc00793d2eb8 Mon Sep 17 00:00:00 2001 From: Heiko Does Date: Thu, 10 Aug 2023 12:53:23 +0200 Subject: [PATCH 09/32] add croupsns option (#1253) Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: Heiko Does --- CHANGELOG.md | 2 ++ resources/container.rb | 2 ++ spec/libraries/container_spec.rb | 24 +++++++++++++++++++++--- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6f68fc119..5343e715e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- added cgroup_ns option to container resource with default private + ## 11.1.1 - *2023-07-10* ## 11.1.0 - *2023-06-06* diff --git a/resources/container.rb b/resources/container.rb index 94c63b0216..b5653cadc0 100644 --- a/resources/container.rb +++ b/resources/container.rb @@ -12,6 +12,7 @@ property :autoremove, [true, false], default: false, desired_state: false property :cap_add, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) } property :cap_drop, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) } +property :cgroup_ns, String, default: 'private' property :cgroup_parent, String, default: '' property :cpus, [Integer, Float], coerce: proc { |v| coerce_cpus(v) }, default: 0 property :cpu_shares, Integer, default: 0 @@ -479,6 +480,7 @@ def load_container_labels 'CapAdd' => new_resource.cap_add, 'CapDrop' => new_resource.cap_drop, 'CgroupParent' => new_resource.cgroup_parent, + 'CgroupnsMode' => new_resource.cgroup_ns, 'CpuShares' => new_resource.cpu_shares, 'CpusetCpus' => new_resource.cpuset_cpus, 'Devices' => new_resource.devices, diff --git a/spec/libraries/container_spec.rb b/spec/libraries/container_spec.rb index 8254b492f2..f2ad9a1504 100644 --- a/spec/libraries/container_spec.rb +++ b/spec/libraries/container_spec.rb @@ -71,7 +71,7 @@ expect { chef_run }.to_not raise_error expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CgroupnsMode' => 'private', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } ) } end @@ -98,7 +98,7 @@ expect { chef_run }.to_not raise_error expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } }, 'Healthcheck' => { 'Test' => ['string'], 'Interval' => 0, 'Timeout' => 0, 'Retries' => 0, 'StartPeriod' => 0 } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CgroupnsMode' => 'private', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } }, 'Healthcheck' => { 'Test' => ['string'], 'Interval' => 0, 'Timeout' => 0, 'Retries' => 0, 'StartPeriod' => 0 } } ) } end @@ -117,7 +117,25 @@ expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', # Should be missing 'MemorySwappiness' - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CgroupnsMode' => 'private', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } + ) + } + end + + context 'creates docker container with cgroupns option' do + recipe do + docker_container 'hello_world' do + tag 'ubuntu:latest' + cgroup_ns 'host' + action :create + end + end + + it { + expect { chef_run }.to_not raise_error + expect(chef_run).to create_docker_container('hello_world').with( + tag: 'ubuntu:latest', + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupnsMode' => 'host', 'CgroupParent' => '', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } ) } end From 2644ae657c708d3885b399714f7f620324015bd3 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:53:26 +0100 Subject: [PATCH 10/32] Update changelog for 11.2.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5343e715e9..f6f5d83afa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.2.0 - *2023-08-10* - added cgroup_ns option to container resource with default private From 75d5ba0d2abe9b3af9fe6d3a2969eb1e6be456ee Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:53:27 +0100 Subject: [PATCH 11/32] Update metadata for 11.2.0 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index e01eabb4de..3740175e90 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.1.1' +version '11.2.0' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From 0dc17ff7503292b3dc0113e6f03f23559b41be58 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:53:29 +0100 Subject: [PATCH 12/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6f5d83afa..ffad313854 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.2.0 - *2023-08-10* - added cgroup_ns option to container resource with default private From 26cf03c064f16d113325cebeca38c8154f52f35c Mon Sep 17 00:00:00 2001 From: Ben Hughes Date: Fri, 18 Aug 2023 16:22:38 +0100 Subject: [PATCH 13/32] Fix breaking change introduced by #1253 (#1256) --- CHANGELOG.md | 2 ++ libraries/helpers_container.rb | 10 ++++++++++ resources/container.rb | 11 +++++------ spec/libraries/container_spec.rb | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 libraries/helpers_container.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index ffad313854..54332d0207 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Fix breaking change introduced by #1253 + ## 11.2.0 - *2023-08-10* - added cgroup_ns option to container resource with default private diff --git a/libraries/helpers_container.rb b/libraries/helpers_container.rb new file mode 100644 index 0000000000..301ff97aef --- /dev/null +++ b/libraries/helpers_container.rb @@ -0,0 +1,10 @@ +module DockerCookbook + module DockerHelpers + module Container + def cgroupv2? + return if node.dig('filesystem', 'by_device').nil? + node.dig('filesystem', 'by_device').key?('cgroup2') + end + end + end +end diff --git a/resources/container.rb b/resources/container.rb index b5653cadc0..a145d80f03 100644 --- a/resources/container.rb +++ b/resources/container.rb @@ -2,6 +2,8 @@ use 'partial/_base' use 'partial/_logging' +include DockerCookbook::DockerHelpers::Container + property :container_name, String, name_property: true property :repo, String, default: lazy { container_name } property :tag, String, default: 'latest' @@ -12,7 +14,7 @@ property :autoremove, [true, false], default: false, desired_state: false property :cap_add, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) } property :cap_drop, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) } -property :cgroup_ns, String, default: 'private' +property :cgroup_ns, String, default: lazy { cgroupv2? ? 'private' : 'host' } property :cgroup_parent, String, default: '' property :cpus, [Integer, Float], coerce: proc { |v| coerce_cpus(v) }, default: 0 property :cpu_shares, Integer, default: 0 @@ -657,6 +659,8 @@ def load_container_labels end action_class do + include DockerCookbook::DockerHelpers::Container + def validate_container_create if new_resource.property_is_set?(:restart_policy) && new_resource.restart_policy != 'no' && @@ -731,9 +735,4 @@ def ulimits_to_hash def read_env_file new_resource.env_file.map { |f| ::File.readlines(f).map(&:strip) }.flatten end - - def cgroupv2? - return if node.dig('filesystem', 'by_device').nil? - node.dig('filesystem', 'by_device').key?('cgroup2') - end end diff --git a/spec/libraries/container_spec.rb b/spec/libraries/container_spec.rb index f2ad9a1504..da39b674e2 100644 --- a/spec/libraries/container_spec.rb +++ b/spec/libraries/container_spec.rb @@ -117,7 +117,7 @@ expect(chef_run).to create_docker_container('hello_world').with( tag: 'ubuntu:latest', # Should be missing 'MemorySwappiness' - create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CgroupnsMode' => 'private', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } + create_options: { 'name' => 'hello_world', 'Image' => 'hello_world:ubuntu:latest', 'Labels' => {}, 'Cmd' => nil, 'AttachStderr' => false, 'AttachStdin' => false, 'AttachStdout' => false, 'Domainname' => '', 'Entrypoint' => nil, 'Env' => [], 'ExposedPorts' => {}, 'Healthcheck' => nil, 'Hostname' => nil, 'MacAddress' => nil, 'NetworkDisabled' => false, 'OpenStdin' => false, 'StdinOnce' => false, 'Tty' => false, 'User' => nil, 'Volumes' => {}, 'WorkingDir' => nil, 'HostConfig' => { 'Binds' => nil, 'CapAdd' => nil, 'CapDrop' => nil, 'CgroupParent' => '', 'CgroupnsMode' => 'host', 'CpuShares' => 0, 'CpusetCpus' => '', 'Devices' => [], 'Dns' => [], 'DnsSearch' => [], 'ExtraHosts' => nil, 'IpcMode' => 'shareable', 'Init' => nil, 'KernelMemory' => 0, 'Links' => nil, 'LogConfig' => nil, 'Memory' => 0, 'MemorySwap' => nil, 'MemoryReservation' => 0, 'NanoCpus' => 0, 'NetworkMode' => 'bridge', 'OomKillDisable' => false, 'OomScoreAdj' => -500, 'Privileged' => false, 'PidMode' => '', 'PortBindings' => {}, 'PublishAllPorts' => false, 'RestartPolicy' => { 'Name' => nil, 'MaximumRetryCount' => 0 }, 'ReadonlyRootfs' => false, 'Runtime' => 'runc', 'SecurityOpt' => nil, 'ShmSize' => 67108864, 'Sysctls' => {}, 'Tmpfs' => {}, 'Ulimits' => nil, 'UsernsMode' => '', 'UTSMode' => '', 'VolumesFrom' => nil, 'VolumeDriver' => nil }, 'NetworkingConfig' => { 'EndpointsConfig' => { 'bridge' => { 'IPAMConfig' => { 'IPv4Address' => nil }, 'Aliases' => [] } } } } ) } end From 4d328da6a91c04a8ee03156041166448e891643f Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:22:41 +0100 Subject: [PATCH 14/32] Update changelog for 11.2.1 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54332d0207..d604592ba7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.2.1 - *2023-08-18* - Fix breaking change introduced by #1253 From cf4e96b743d135fd63d8900fae696f8db05da86d Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:22:41 +0100 Subject: [PATCH 15/32] Update metadata for 11.2.1 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 3740175e90..28e8974a03 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.2.0' +version '11.2.1' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From eb0a0243af3d36aaf3e62cbf9f61250bb8d7bbb1 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:22:43 +0100 Subject: [PATCH 16/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d604592ba7..de2a98bb35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.2.1 - *2023-08-18* - Fix breaking change introduced by #1253 From f14b74f573fa0b92e5eba8bf459656c56109ffd6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:26:07 +0100 Subject: [PATCH 17/32] Update dependency ubuntu to v22 (#1252) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ccb1c2121..1bbb844e4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,7 +69,7 @@ jobs: integration-amazonlinux: needs: lint-unit - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: os: From 715bd899911f2203b6928117d445c830bca5d937 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:26:10 +0100 Subject: [PATCH 18/32] Update changelog for 11.2.2 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de2a98bb35..84e48f0ce6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.2.2 - *2023-08-18* ## 11.2.1 - *2023-08-18* From d2239ecf55b098b18a173ac10f09a5bd2a7014c6 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:26:11 +0100 Subject: [PATCH 19/32] Update metadata for 11.2.2 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 28e8974a03..0c49fc5cbf 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.2.1' +version '11.2.2' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From 1d057a19da80ca0190ac395ba276b17ff56bb969 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 18 Aug 2023 16:26:13 +0100 Subject: [PATCH 20/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 84e48f0ce6..ded8bdb4f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.2.2 - *2023-08-18* ## 11.2.1 - *2023-08-18* From e50298b2ff45a93e69e0ba3121a3f82435143b22 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:48:02 +0100 Subject: [PATCH 21/32] Update actions/checkout action to v4 (#1257) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bbb844e4c..74606bddec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Chef uses: actionshub/chef-install@2.0.4 - name: Dokken @@ -81,7 +81,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Chef uses: actionshub/chef-install@2.0.4 - name: Dokken @@ -114,7 +114,7 @@ jobs: steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Chef uses: actionshub/chef-install@2.0.4 - name: Dokken From 9dfb412ff9ab3d4f830ad3ad14bff97c84f837ed Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:48:05 +0100 Subject: [PATCH 22/32] Update changelog for 11.2.3 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ded8bdb4f0..2fa2270230 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.2.3 - *2023-09-04* ## 11.2.2 - *2023-08-18* From 5ed87d35240031e9d08964bba610c68ca1306f64 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:48:05 +0100 Subject: [PATCH 23/32] Update metadata for 11.2.3 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 0c49fc5cbf..640cc6f6a9 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.2.2' +version '11.2.3' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From aca048de9d68a83d16544f209ac1b60d7c7bffbe Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Mon, 4 Sep 2023 15:48:08 +0100 Subject: [PATCH 24/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa2270230..10e83665eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.2.3 - *2023-09-04* ## 11.2.2 - *2023-08-18* From 74e9a16efd48de797cbb6ce7400190afecd943b2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Sep 2023 22:48:22 +0800 Subject: [PATCH 25/32] Update sous-chefs/.github digest to 2881047 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | sous-chefs/.github | action | digest | `3b1d4d5` -> `2881047` | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/sous-chefs/docker). --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74606bddec..a3558ca2dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ name: ci jobs: lint-unit: - uses: sous-chefs/.github/.github/workflows/lint-unit.yml@3b1d4d5be742044535931b5b78afe84f4b94d7fa + uses: sous-chefs/.github/.github/workflows/lint-unit.yml@288104777764acba5413b6cf62d36c93e9d1c0dc permissions: actions: write checks: write From e19f990bb0ba39cd76ffb8457f3a7cc16e812390 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:48:26 +0100 Subject: [PATCH 26/32] Update changelog for 11.2.4 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10e83665eb..8c64a9a863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.2.4 - *2023-09-29* ## 11.2.3 - *2023-09-04* From 4094395a007c4b85f5f619dddea9134d4495f99b Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:48:28 +0100 Subject: [PATCH 27/32] Update metadata for 11.2.4 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 640cc6f6a9..30a8128095 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.2.3' +version '11.2.4' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From 82b48f8a4c0db6fba0fa8693a00e94eb10dd6f01 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 29 Sep 2023 15:48:30 +0100 Subject: [PATCH 28/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c64a9a863..99ba734d07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.2.4 - *2023-09-29* ## 11.2.3 - *2023-09-04* From 8736a0c18dab0d7afc8aaf9deda75bd97a0f9836 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:35:07 +0100 Subject: [PATCH 29/32] Update sous-chefs/.github digest to 19068b3 (#1260) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3558ca2dc..a6b927ff0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ name: ci jobs: lint-unit: - uses: sous-chefs/.github/.github/workflows/lint-unit.yml@288104777764acba5413b6cf62d36c93e9d1c0dc + uses: sous-chefs/.github/.github/workflows/lint-unit.yml@19068b35e66a632c5640c222430fcea905c1662f permissions: actions: write checks: write From a6913b7ffa653ad4d49cf6f294a4e1870d989627 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:35:11 +0100 Subject: [PATCH 30/32] Update changelog for 11.2.5 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ba734d07..f68818d493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 11.2.5 - *2023-10-10* ## 11.2.4 - *2023-09-29* From caf5acc90aa5ea06f58f57ccfe19798e89d84ada Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:35:11 +0100 Subject: [PATCH 31/32] Update metadata for 11.2.5 --- metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.rb b/metadata.rb index 30a8128095..097cc3cf88 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'help@sous-chefs.org' license 'Apache-2.0' description 'Provides docker_service, docker_image, and docker_container resources' -version '11.2.4' +version '11.2.5' source_url 'https://github.com/sous-chefs/docker' issues_url 'https://github.com/sous-chefs/docker/issues' chef_version '>= 16.0', '< 19.0' From e37bc4632774ba44d0f3fd6972fc79a2a08dad73 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Tue, 10 Oct 2023 13:35:14 +0100 Subject: [PATCH 32/32] Set Changelog to ## Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f68818d493..4f64de3ee7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the docker cookbook. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + ## 11.2.5 - *2023-10-10* ## 11.2.4 - *2023-09-29*