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
--- /dev/null
+require "serverspec"
+
+# Required by serverspec
+set :backend, :exec
+
+describe package("docker-ce") do
+ it { should be_installed }
+end
+
+describe service("docker") do
+ it { should be_enabled }
+ it { should be_running }
+end