]> git.openstreetmap.org Git - chef.git/commitdiff
Allow testing docker with the overlay2 storage driver
authorTom Hughes <tom@compton.nu>
Thu, 14 Jul 2022 12:42:54 +0000 (12:42 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 14 Jul 2022 12:42:54 +0000 (12:42 +0000)
.kitchen.yml
cookbooks/docker/recipes/default.rb
cookbooks/docker/templates/default/daemon.json.erb

index b7b9d9e60bab2538fef6f97c47fd8c35986a4b20..933dbdfc07081ffacc1ea0f968abe932136de3b9 100644 (file)
@@ -2,6 +2,8 @@
 driver:
   name: dokken
   chef_version: 17
+  volumes:
+    - /var/lib/docker
   env:
     - container=dokken
 
index bfdc88a09c8ec018272b2bee0fef0b1d1f0f9a72..1dfe9adde7be0a60964551186b867a7e1aa30735 100644 (file)
@@ -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
index 15f9d2eb2cfc81b747385e041c70b37a2530c96d..5d18abccd26e6c68d9ad619c0f7d14b26a94bdd0 100644 (file)
@@ -4,5 +4,5 @@
   "log-opts": {
     "max-size": "100m"
   },
-  "storage-driver": "<%= @storage_driver %>"
+  "storage-driver": "overlay2"
 }