Last active
December 6, 2016 18:40
-
-
Save grownseed/247df1654f55ae25ea10fe0bd5e78e97 to your computer and use it in GitHub Desktop.
CentOS Docker Dev Host Setup
This file contains hidden or 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
# Allowing symlinks for Windows host/Linux guest VirtualBox: | |
# - run vbox as administrator | |
# - run command prompt/PS as administrator and run (from vbox install folder): | |
# VBoxManage.exe setextradata <VM Name> VBoxInternal2/SharedFoldersEnableSymlinksCreate/<Share Name> 1 | |
# And to check the value stuck: | |
# VBoxManage.exe getextradata <VM Name> enumerate | |
# (Note: replace <VM Name> and <Share Name> accordingly) | |
# add epel repo | |
yum install -y epel-release | |
yum install -y dkms | |
yum groupinstall -y "Development Tools" | |
yum install -y kernel-devel | |
yum update | |
reboot | |
# install vbox additions | |
yum install -y docker bind-utils | |
systemctl enable docker | |
echo -e "mount -t vboxsf data /data" >> /etc/rc.d/rc.local | |
chmod +x /etc/rc.d/rc.local | |
# local DNS for dev | |
docker run -d --name=dnsdock --restart=always -e DNSDOCK_NAME=dnsdock -e DNSDOCK_IMAGE=devtools -p 172.17.0.1:53:53/udp -v /var/run/docker.sock:/var/run/docker.sock --privileged=true aacebedo/dnsdock:latest | |
-amd64 --domain=vm | |
# emable IPV4 forwarding | |
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment