X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/28d9a1d5b4c58ebc33e94780753e6c1e2a2e2181..b413a8a17bc14d4503fe4d6432223a5f45c5286e:/cookbooks/docker/recipes/default.rb?ds=sidebyside diff --git a/cookbooks/docker/recipes/default.rb b/cookbooks/docker/recipes/default.rb index fd3773634..80fd15b3f 100644 --- a/cookbooks/docker/recipes/default.rb +++ b/cookbooks/docker/recipes/default.rb @@ -17,28 +17,29 @@ # limitations under the License. # +include_recipe "apt" + package %w[ - apt-transport-https - ca-certificates - curl - software-properties-common - gnupg2 + docker-ce + docker-ce-cli + containerd.io ] +directory "/etc/docker" do + owner "root" + group "root" + mode "755" +end + template "/etc/docker/daemon.json" do source "daemon.json.erb" owner "root" group "root" - mode 0o644 + mode "644" end -package %w[ - docker-ce - docker-ce-cli - containerd.io -] - service "docker" do action [:enable, :start] subscribes :restart, "template[/etc/docker/daemon.json]" + not_if { kitchen? } end