Skip to content

Instantly share code, notes, and snippets.

@grownseed
Last active December 6, 2016 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grownseed/247df1654f55ae25ea10fe0bd5e78e97 to your computer and use it in GitHub Desktop.
Save grownseed/247df1654f55ae25ea10fe0bd5e78e97 to your computer and use it in GitHub Desktop.
CentOS Docker Dev Host Setup
# 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