]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/docker/recipes/default.rb
Get docker working in the test-kitchen environment
[chef.git] / cookbooks / docker / recipes / default.rb
index 80fd15b3f6be34ac90b8a3776f50df9d1f984b2b..bfdc88a09c8ec018272b2bee0fef0b1d1f0f9a72 100644 (file)
@@ -31,15 +31,21 @@ 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
   action [:enable, :start]
   subscribes :restart, "template[/etc/docker/daemon.json]"
-  not_if { kitchen? }
 end