Forked from apolloclark/Kali 2016.1, Docker Install script
Created
January 18, 2020 10:55
-
-
Save attacker34/6e489a7f3c190ed946ed6d329d17b6e3 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