# 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