Last active
July 24, 2018 15:40
-
-
Save thomascrepain/bdfde4e5fadafdb777707a558508e975 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# 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