Skip to content

Instantly share code, notes, and snippets.

@dclucas
Created March 9, 2015 16:05
Show Gist options
  • Save dclucas/a2d28080446e3b6d2252 to your computer and use it in GitHub Desktop.
Save dclucas/a2d28080446e3b6d2252 to your computer and use it in GitHub Desktop.
Docker + Dokku setup
if [ -z "$LOGENTRIES_TOKEN" ]; then echo "Please set up a LOGENTRIES_TOKEN env var before running this script";
else
################## Installing Docker ##################
# https://docs.docker.com/installation/ubuntulinux/
curl -sSL https://get.docker.com/ubuntu/ | sudo sh
#### Configuring docker to run without sudo
# http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo
## Add the docker group if it doesn't already exist.
sudo groupadd docker
## Add the connected user "${USER}" to the docker group. Change the user name to match your preferred user.
sudo gpasswd -a ${USER} docker
## Restart the Docker daemon:
sudo service docker restart
## If you are on Ubuntu 14.04 and up use docker.io instead:
sudo service docker.io restart
## activate the changes to groups.
newgrp docker
################## Installing Dokku ##################
wget -qO- https://raw.github.com/progrium/dokku/v0.3.15/bootstrap.sh | sudo DOKKU_TAG=v0.3.15 bash
################## Installing LogEntries ##################
docker run -v /var/run/docker.sock:/var/run/docker.sock logentries/docker-logentries -t $LOGENTRIES_TOKEN -j -a host=`uname -n`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment