Skip to content

Commit

Permalink
Fix debian install of dockerd (#16)
Browse files Browse the repository at this point in the history
* Fix debian install of dockerd

* Add oldstable to build list

* Update install-dind.sh

use $distro instead of debian

---------

Co-authored-by: idodod <[email protected]>
  • Loading branch information
ingwarsw and idodod authored Oct 13, 2023
1 parent d167c75 commit 7478ffc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
3 changes: 2 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION 0.6
VERSION 0.7

INSTALL_DIND:
COMMAND
Expand All @@ -20,6 +20,7 @@ test-install-dind-amd64:
--base_image=alpine:latest \
--base_image=debian:stable \
--base_image=debian:stable-slim \
--base_image=debian:oldstable \
--base_image=ubuntu:latest \
--base_image=amazonlinux:1 \
--base_image=amazonlinux:2 \
Expand Down
21 changes: 9 additions & 12 deletions install-dind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,16 @@ apt_get_update() {

install_dockerd_debian_like() {
export DEBIAN_FRONTEND=noninteractive
apt-get remove -y docker docker-engine docker.io containerd runc || true
apt-get remove -y docker.io docker-doc docker-compose podman-docker containerd runc || true
apt_get_update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL "https://download.docker.com/linux/$distro/gpg" | apt-key add -
add-apt-repository \
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$distro \
$(lsb_release -cs) \
stable"
apt-get install -y ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/$distro/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$distro \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update # dont use apt_get_update since we must update the newly added apt repo
apt-get install -y docker-ce docker-ce-cli containerd.io
}
Expand Down

0 comments on commit 7478ffc

Please sign in to comment.