docker: move back to installing via apt

This commit is contained in:
Frieder Schlesier 2018-06-14 09:44:12 +02:00
parent 8c4082f1cf
commit 8450f8821d
1 changed files with 16 additions and 17 deletions

View File

@ -161,30 +161,29 @@ install_i3() {
}
install_docker() {
# https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-repository
# bad experiences with static binaries...
# https://docs.docker.com/engine/installation/binaries/#install-static-binaries
VERS="18.03.1-ce"
echo "installing docker binary Version $VERS ..."
# https://github.com/tianon/cgroupfs-mount/blob/master/cgroupfs-mount
# omg! you changed the static download URL - AGAIN!??! and removed the checksums? wtf?
# TODO move to apt packages again
# TODO also make sure raspbian/arm setup works.
curl -SL https://download.docker.com/linux/static/stable/x86_64/docker-$VERS.tgz \
-o /tmp/docker.tgz
# curl -SL https://get.docker.com/builds/Linux/x86_64/docker-$VERS.tgz.sha256 \
# -o /tmp/docker.tgz.sha256
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
cd /tmp
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
# if [ ! $(cat /tmp/docker.tgz.sha256 | sha256sum -c -) ]; then
# echo "... checksum failed... stopping"
# exit 1;
# fi
# add docker apt repo
cat <<-EOF > /etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
# deb [arch=amd64] https://download.docker.com/linux/debian stretch test
# deb [arch=amd64] https://download.docker.com/linux/debian stretch nightly
EOF
tar -xvzf docker.tgz
mv docker/* /usr/bin
rm /tmp/docker.tgz
# rm /tmp/docker.tgz.sha256
}