Only install docker if missing

This commit is contained in:
David Heinemeier Hansson
2023-01-13 17:11:01 +01:00
parent eed8165ec1
commit 100d68d67e
2 changed files with 2 additions and 3 deletions

View File

@@ -4,8 +4,7 @@ namespace :mrsk do
namespace :server do
desc "Setup Docker on the remote servers"
task :bootstrap do
# FIXME: Detect when apt-get is not available and use the appropriate alternative
on(MRSK.config.hosts) { execute "apt-get install docker.io -y" }
on(MRSK.config.hosts) { execute "which docker || apt-get install docker.io -y" }
end
end
end