Last active
July 1, 2019 17:24
-
-
Save kitos9112/0939968ff60d870b2b1019844a0db47e to your computer and use it in GitHub Desktop.
This small Bash script will install the latest version of Docker on your Raspberry pi - It works on Raspberry Pi 4 B+ - Just run --> curl -fsSL http://bit.ly/2xm7kxb | sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################## | |
#- version ${SCRIPT_NAME} 0.0.1 | |
#- author Marcos Soutullo | |
#- license GNU General Public License | |
# DESCRIPTION | |
# This small bash script will install Docker on your RaspberryPi for you without human interaction. | |
# If your Raspbian version it's not currently available on get.docker.com | |
# It will download use the latest Debian stable version defined in variable DOCKER_STABLE | |
# EXECUTION | |
# curl -fsSL http://bit.ly/2xm7kxb | sudo sh | |
# WARNING | |
# If you already have Docker installed, this script can cause trouble. | |
# If you installed the current Docker package using this script and are using it | |
# again to update Docker, you can safely ignore this message. | |
################################################## | |
DOCKER_STABLE='18.09.7~3-0~debian-buster_armhf.deb' | |
CONTAINERD_STABLE='1.2.6-3_armhf.deb' | |
# Ensuring our system packages are up to date | |
apt update && apt upgrade -y | |
# Install packages to allow apt to use repository over HTTPs - Plus other useful stuff | |
apt install apt-transport-https ca-certificates software-properties-common git wget pparmor-utils avahi-daemon curl dbus jq network-manager socat | |
# Install Docker - | |
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh || { | |
echo "It seems that your distribution is not available yet We're going to install compiled images on docker-${DOCKER_STABLE} \ | |
and containerd-${CONTAINERD_STABLE}" | |
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/containerd.io_$CONTAINERD_STABLE | |
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce-cli_$DOCKER_STABLE | |
wget https://download.docker.com/linux/debian/dists/buster/pool/stable/armhf/docker-ce_$DOCKER_STABLE | |
dpkg -i containerd.io_$CONTAINERD_STABLE | |
dpkg -i docker-ce-cli_$DOCKER_STABLE | |
dpkg -i docker-ce_$DOCKER_STABLE } | |
usermod -aG docker ${USER} && su - ${USER} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment