Skip to content

Instantly share code, notes, and snippets.

@thomascrepain
Last active July 24, 2018 15:40
Show Gist options
  • Save thomascrepain/bdfde4e5fadafdb777707a558508e975 to your computer and use it in GitHub Desktop.
Save thomascrepain/bdfde4e5fadafdb777707a558508e975 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Installs the bare minimum to start a docker container on a Raspberry Pi. Make sure you start from a fresh copy of Raspbian (light)
# See: https://www.raspberrypi.org/downloads/raspbian/
#
# Run this script as sudo
# Install docker
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
# Run docker without sudo
groupadd docker
gpasswd -a $USER docker
newgrp docker
# Make docker-compose available as an alias to a docker container containing docker-compose #yooDawg
echo alias docker-compose="'"'docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:/rootfs/$PWD" \
-w="/rootfs/$PWD" \
docker/compose:1.22.0'"'" >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment