Forked from apolloclark/Kali 2016.1, Docker Install script
Created
February 7, 2017 15:21
-
-
Save m0zgen/cb5f67189def3304491f39e42e758f6c 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 | |
# update apt-get | |
export DEBIAN_FRONTEND="noninteractive" | |
sudo apt-get update | |
# remove previously installed Docker | |
sudo apt-get purge lxc-docker* | |
sudo apt-get purge docker.io* | |
# add Docker repo | |
sudo apt-get install -y apt-transport-https ca-certificates | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
cat > /etc/apt/sources.list.d/docker.list <<'EOF' | |
deb https://apt.dockerproject.org/repo debian-stretch main | |
EOF | |
sudo apt-get update | |
# install Docker | |
sudo apt-get install -y docker-engine | |
sudo service docker start | |
sudo docker run hello-world | |
# configure Docker user group permissions | |
sudo groupadd docker | |
sudo gpasswd -a ${USER} docker | |
sudo service docker restart | |
# set Docker to auto-launch on startup | |
sudo systemctl enable docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment