Skip to content

Instantly share code, notes, and snippets.

@johannesl
Last active July 10, 2026 06:46
Show Gist options
  • Select an option

  • Save johannesl/b03a3f25c7799cd8d997de3d7d6ef74c to your computer and use it in GitHub Desktop.

Select an option

Save johannesl/b03a3f25c7799cd8d997de3d7d6ef74c to your computer and use it in GitHub Desktop.
Debian 13 with container machine

How to use this

Download the Dockerfile below into a new folder, then run:

container build -t local/debian-machine:13 .

You'll then be able to create a container machine with this local image using:

container machine create local/debian-machine:13 --name debian

This is based on the Ubuntu Dockerfile from the official container-machine.md from Apple's GitHub repo. I just removed the unminimize step which is not available on regular Debian.

FROM debian:13
ENV container container
RUN apt-get update && \
apt-get install -y \
dbus systemd openssh-server net-tools iproute2 iputils-ping curl wget vim-tiny man sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN >/etc/machine-id
RUN >/var/lib/dbus/machine-id
RUN systemctl set-default multi-user.target
RUN systemctl mask \
dev-hugepages.mount \
sys-fs-fuse-connections.mount \
systemd-update-utmp.service \
systemd-tmpfiles-setup.service \
console-getty.service
RUN systemctl disable \
networkd-dispatcher.service
RUN sed -i -e 's/^AcceptEnv LANG LC_\*$/#AcceptEnv LANG LC_*/' /etc/ssh/sshd_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment