Skip to content

Instantly share code, notes, and snippets.

@EonYang
Last active March 31, 2021 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EonYang/8e9319699ad8177ff44460684c5ac758 to your computer and use it in GitHub Desktop.
Save EonYang/8e9319699ad8177ff44460684c5ac758 to your computer and use it in GitHub Desktop.
Setup docker on a new Raspberry Pi
# install ubuntu server on the pi and ssh into the server
# https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi#1-overview
# create new user with shorter name
sudo adduser pi
sudo usermod -aG sudo pi
# copying SSH key
# on your Mac
ssh-copy-id -i ~/.ssh/id_rsa pi@pi3
# install docker
sudo snap install docker
# grant permission to current user
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
# test docker
docker run --rm hello-world
# if permission error, reboot and try again
sudo reboot
# docker compose should be ready too
docker-compose version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment