From 19e911cb27b7b413829a7cbb38aad5a59db171c5 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 14 Jul 2022 12:42:54 +0000 Subject: [PATCH] Allow testing docker with the overlay2 storage driver --- .kitchen.yml | 2 ++ cookbooks/docker/recipes/default.rb | 7 ------- cookbooks/docker/templates/default/daemon.json.erb | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index b7b9d9e60..933dbdfc0 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -2,6 +2,8 @@ driver: name: dokken chef_version: 17 + volumes: + - /var/lib/docker env: - container=dokken diff --git a/cookbooks/docker/recipes/default.rb b/cookbooks/docker/recipes/default.rb index bfdc88a09..1dfe9adde 100644 --- a/cookbooks/docker/recipes/default.rb +++ b/cookbooks/docker/recipes/default.rb @@ -31,18 +31,11 @@ directory "/etc/docker" do mode "755" end -storage_driver = if kitchen? - "vfs" - else - "overlay2" - end - template "/etc/docker/daemon.json" do source "daemon.json.erb" owner "root" group "root" mode "644" - variables :storage_driver => storage_driver end service "docker" do diff --git a/cookbooks/docker/templates/default/daemon.json.erb b/cookbooks/docker/templates/default/daemon.json.erb index 15f9d2eb2..5d18abccd 100644 --- a/cookbooks/docker/templates/default/daemon.json.erb +++ b/cookbooks/docker/templates/default/daemon.json.erb @@ -4,5 +4,5 @@ "log-opts": { "max-size": "100m" }, - "storage-driver": "<%= @storage_driver %>" + "storage-driver": "overlay2" } -- 2.39.5