Skip to content

Instantly share code, notes, and snippets.

@Madh93
Created November 29, 2017 16:42
Show Gist options
  • Save Madh93/e03b31d498bcf7296e962ae7096f7bba to your computer and use it in GitHub Desktop.
Save Madh93/e03b31d498bcf7296e962ae7096f7bba to your computer and use it in GitHub Desktop.
Docker Setup on Raspbian Stretch

Docker Setup on Raspbian Stretch

Table of Contents

  1. Before installing Docker
  1. Installing Docker
  1. After installing Docker

Before installing Docker

Update and upgrade package index

apt update && apt upgrade

Install necessary packages

apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Add official GPG key

curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -

Set up the stable repository

echo "deb [arch=armhf] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list

Installing Docker

Update package index

apt update

Install Docker CE

apt install docker-ce

After installing Docker

Create a Docker group

groupadd docker

Add your user to the Docker group

usermod -aG docker $USER

Add Docker to start on boot

systemctl enable docker

Say hello world

docker run armhf/hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment