itamae/cookbooks/docker/install.rb

29 lines
612 B
Ruby
Raw Normal View History

2019-03-03 08:50:49 +00:00
%w(apt-transport-https ca-certificates curl software-properties-common).each do |p|
package p do
action :install
end
end
execute 'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -' do
not_if 'apt-key fingerprint 0EBFCD88 | grep 9DC8'
end
execute 'add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable" -y' do
2019-03-03 08:50:49 +00:00
not_if 'which docker'
end
execute 'apt-get update' do
not_if 'which docker'
end
2021-04-25 10:37:45 +00:00
%w(docker-ce docker-ce-cli containerd.io).each do |p|
package p
end
service 'docker' do
action :nothing
end