]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apt/recipes/docker.rb
apt: enable backports on debian
[chef.git] / cookbooks / apt / recipes / docker.rb
index f28c15b0b17d7ee39c33eceef4233b6ea0d1d44e..2aeb832e3e50cdc7fa9e3a871d1f70f462cf1f6b 100644 (file)
 
 include_recipe "apt"
 
+docker_platform = if platform?("debian")
+                    "debian"
+                  else
+                    "ubuntu"
+                  end
+
+docker_arch = if arm?
+                "arm64"
+              else
+                "amd64"
+              end
+
 apt_repository "docker" do
-  uri "https://download.docker.com/linux/ubuntu"
-  arch "amd64"
+  uri "https://download.docker.com/linux/#{docker_platform}"
+  arch docker_arch
   components ["stable"]
-  key "https://download.docker.com/linux/ubuntu/gpg"
+  key "https://download.docker.com/linux/#{docker_platform}/gpg"
 end