Skip to content

adduc/blog-alpine-linux-docker-libvirt-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

adventures in managing docker+libvirt on alpine linux using terraform

Out of the box, docker can be installed and run on alpine linux without issue. However, libvirt requires a few extra steps before it can be used with docker and terraform.

Creating a bridge for libvirt

# install bridge utils
apk add bridge

# create a bridge (edit as needed)
cat <<<EOF >> /etc/network/interfaces
auto libvirtbr0
iface libvirtbr0 inet static
  address 192.168.1.2
  netmask 255.255.255.0
  gateway 192.168.1.1
  bridge-ports eth0
  bridge-stp 0
EOF

# restart networking
rc-service networking restart

Making docker play nice with libvirt

/etc/sysctl.conf:

# @see https://serverfault.com/questions/963759/docker-breaks-libvirt-bridge-network
net.bridge.bridge-nf-call-iptables=0

Allowing libvirt provider to communicate with libvirt over ssh

echo AllowTcpForwarding yes >> /etc/ssh/sshd_config

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published