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) \
|
2022-07-18 01:57:33 +00:00
|
|
|
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
|
|
|
|
|
2023-02-05 06:02:03 +00:00
|
|
|
%w(docker-ce docker-ce-cli containerd.io docker-compose-plugin).each do |p|
|
2021-04-25 10:37:45 +00:00
|
|
|
package p
|
|
|
|
end
|
|
|
|
|
|
|
|
service 'docker' do
|
|
|
|
action :nothing
|
|
|
|
end
|