airshipctl/tools/airship-in-a-pod/libvirt/Dockerfile
Fletcher, Stacey (sf5715) a423607000 Airship in a Pod
Introduces Airship in pod. This includes:
* A base image which sets up common requirements
* An image for the libvirt service
* An image for building a specified instance of airshipctl
* An image for initializing the various libvirt infrastructure required
  for a deployment
* An image which runs the deployment scripts

Closes: #313

Change-Id: Ib1114350190b0fe0c0761ff67b38b3eca783161a
2021-02-22 19:55:44 -06:00

35 lines
1015 B
Docker

FROM ianhowell/base:latest
SHELL ["bash", "-exc"]
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update ;\
apt-get dist-upgrade -y ;\
apt-get install -y \
libvirt-daemon \
qemu-kvm \
libvirt-daemon-system \
bridge-utils \
libvirt-clients \
systemd \
socat ;\
find /etc/systemd/system \
/usr/lib/systemd/system \
-path '*.wants/*' \
-not -name '*journald*' \
-not -name '*systemd-tmpfiles*' \
-not -name '*systemd-user-sessions*' \
-exec rm \{} \; ;\
systemctl set-default multi-user.target ;\
sed -i 's|SocketMode=0660|SocketMode=0666|g' /lib/systemd/system/libvirtd.socket ;\
systemctl enable libvirtd ;\
systemctl enable virtlogd ;\
echo 'user = "root"' >> /etc/libvirt/qemu.conf ;\
echo 'group = "root"' >> /etc/libvirt/qemu.conf
COPY assets /opt/assets/
RUN cp -ravf /opt/assets/* / ;\
rm -rf /opt/assets
ENTRYPOINT /bin/systemd