Skip to content

Instantly share code, notes, and snippets.

@jcarley
Last active October 12, 2021 16:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcarley/4bf5ea2c53ca0b6858a94ae1dab6ed86 to your computer and use it in GitHub Desktop.
Save jcarley/4bf5ea2c53ca0b6858a94ae1dab6ed86 to your computer and use it in GitHub Desktop.
This is the general raspberry pi setup and configuration
#!/bin/bash
# initial OS updates and configuration
sudo apt-get update
sudo apt-get upgrade -y
sudo raspi-config
sudo reboot
passwd
sudo apt-get update && sudo apt-get install ufw vim curl wget git -y
# install and setup docker and docker-compose
curl -sSL https://get.docker.com | sh
sudo groupadd docker
sudo usermod -aG docker $USER
sudo systemctl enable docker
docker ps
sudo reboot
docker images
sudo apt-get -y install libffi-dev libssl-dev python3-dev python3 python3-pip
sudo pip3 -v install docker-compose
# setup docker aliases
echo "alias d=docker" >> .bash_alias
echo "alias dc=docker-compose" >> .bash_alias
echo "bashalias=\"\$HOME/.bash_alias\"" >> .profile
echo "[[ ! -a \$bashalias ]] || source \$bashalias" >> .profile
# install and setup tailscale
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/buster.gpg | sudo apt-key add -
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/buster.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt-get update
sudo apt-get install tailscale -y
sudo tailscale up
ip addr show tailscale0
@jcarley
Copy link
Author

jcarley commented Oct 10, 2021

I don't run this script directly. I only use it as a reminder of what I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment