diff --git a/opennebula-docker/Dockerfile_0.2.0 b/opennebula-docker/Dockerfile_0.2.0 new file mode 100644 index 0000000..2e4cb0a --- /dev/null +++ b/opennebula-docker/Dockerfile_0.2.0 @@ -0,0 +1,16 @@ +FROM debian:trixie + +COPY opennebula-virsh /etc/sudoers.d +COPY entrypoint.sh / + +RUN apt-get update +RUN apt-get install -y gnupg2 openssh-server strace sudo wget ceph-common +RUN wget -q -O- https://downloads.opennebula.io/repo/repo2.key | gpg --dearmor --yes --output /etc/apt/keyrings/opennebula.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/opennebula.gpg] https://downloads.opennebula.io/repo/7.1/Debian/13 stable opennebula" > /etc/apt/sources.list.d/opennebula.list +RUN apt-get update && apt-get install -y --no-install-recommends opennebula-node-kvm + +RUN mv /usr/bin/virsh /usr/bin/virsh.orig +COPY virsh /usr/bin/virsh + + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/opennebula-docker/Dockerfile_0.2.1 b/opennebula-docker/Dockerfile_0.2.1 new file mode 100644 index 0000000..2e4cb0a --- /dev/null +++ b/opennebula-docker/Dockerfile_0.2.1 @@ -0,0 +1,16 @@ +FROM debian:trixie + +COPY opennebula-virsh /etc/sudoers.d +COPY entrypoint.sh / + +RUN apt-get update +RUN apt-get install -y gnupg2 openssh-server strace sudo wget ceph-common +RUN wget -q -O- https://downloads.opennebula.io/repo/repo2.key | gpg --dearmor --yes --output /etc/apt/keyrings/opennebula.gpg +RUN echo "deb [signed-by=/etc/apt/keyrings/opennebula.gpg] https://downloads.opennebula.io/repo/7.1/Debian/13 stable opennebula" > /etc/apt/sources.list.d/opennebula.list +RUN apt-get update && apt-get install -y --no-install-recommends opennebula-node-kvm + +RUN mv /usr/bin/virsh /usr/bin/virsh.orig +COPY virsh /usr/bin/virsh + + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/opennebula-docker/README.org b/opennebula-docker/README.org new file mode 100644 index 0000000..843ed35 --- /dev/null +++ b/opennebula-docker/README.org @@ -0,0 +1,7 @@ +* 0.2.1, 2026-04-04 + - Allow disabling running libvirtd +* 0.2.0, 2026-04-03 + - Try to switch to trixie instead of bookworm + - Use opennebula 7.1 repo +* 0.1.0, 2026-04-03 + - Update entrypoint for ceph/rook diff --git a/opennebula-docker/entrypoint.sh b/opennebula-docker/entrypoint.sh index cc0fb0e..85522d1 100755 --- a/opennebula-docker/entrypoint.sh +++ b/opennebula-docker/entrypoint.sh @@ -1,11 +1,14 @@ #!/bin/sh +# 2026-04-04, Nico Schottelius, Lachen SZ + +set -e +set -u # Add SSH key & start sshd su - oneadmin -c "umask 077; mkdir -p ~/.ssh; echo ${ONEADMIN_SSH_KEY} > ~/.ssh/authorized_keys" /etc/init.d/ssh start - while true; do ###################################################################### # /etc/hosts logic @@ -36,12 +39,14 @@ EOF ###################################################################### # libvirtd logic - if [ -f "$pidfile" ]; then - libvirtd_pid=$(cat $pidfile) - kill -9 $libvirtd_pid - fi + if [ -z "$SKIP_LIBVIRTD" ]; then + if [ -f "$pidfile" ]; then + libvirtd_pid=$(cat $pidfile) + kill -9 $libvirtd_pid + fi - /usr/sbin/libvirtd --daemon --pid-file $pidfile + /usr/sbin/libvirtd --daemon --pid-file $pidfile + fi sleep 3600 done