ZimaOS inside a Docker container.
- KVM acceleration
- Web-based viewer
- Automatic download
services:
zima:
image: dockurr/zima
container_name: zima
devices:
- /dev/kvm
- /dev/net/tun
cap_add:
- NET_ADMIN
ports:
- 8080:80
- 8006:8006
volumes:
- ./zima:/storage
restart: always
stop_grace_period: 2mdocker run -it --rm --name zima -p 8080:80 -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v "${PWD:-.}/zima:/storage" --stop-timeout 120 docker.io/dockurr/zimakubectl apply -f https://raw.githubusercontent.com/dockur/zima/refs/heads/master/kubernetes.ymlVery simple! These are the steps:
-
Start the container and connect to port 8006 using your web browser.
-
Monitor the download and installation progress, and wait until ZimaOS setup has finished.
-
Connect to port 8080 using your web browser.
-
Create an username and password, and login to ZimaOS to complete the setup.
Enjoy your brand new machine, and don't forget to star this repo!
To change the storage location, include the following bind mount in your compose file:
volumes:
- ./zima:/storageReplace the example path ./zima with the desired storage folder or named volume.
By default, ZimaOS will be allowed to use two CPU cores and 4 GB of RAM.
If you want to adjust this, you can specify the desired amount using the following environment variables:
environment:
RAM_SIZE: "8G"
CPU_CORES: "4"When using bridge networking, you can expose ports by adding them to your compose file. If you want to be able to connect to the SSH service of the machine for example, you would add it like this:
ports:
- 2222:22This will make port 2222 on your host redirect to port 22 of the virtual machine.
When using user-mode networking (for example when running under Podman), you will also need to add those ports to the USER_PORTS variable like this:
environment:
USER_PORTS: "22,80,443"By default, the container uses bridge networking, which shares the IP address with the host.
If you want to assign an individual IP address to the container, you can create a macvlan network as follows:
docker network create -d macvlan \
--subnet=192.168.0.0/24 \
--gateway=192.168.0.1 \
--ip-range=192.168.0.100/28 \
-o parent=eth0 vlanBe sure to modify these values to match your local subnet.
Once you have created the network, change your compose file to look as follows:
services:
zima:
container_name: zima
..<snip>..
networks:
vlan:
ipv4_address: 192.168.0.100
networks:
vlan:
external: trueAn added benefit of this approach is that you won't have to perform any port mapping anymore, since all ports will be exposed by default.
Important
This IP address won't be accessible from the Docker host due to the design of macvlan, which doesn't permit communication between the two. If this is a concern, you need to create a second macvlan as a workaround.
After configuring the container for macvlan, it is possible for ZimaOS to become part of your home network by requesting an IP from your router, just like your other devices.
To enable this mode, in which the container and ZimaOS will have separate IP addresses, add the following lines to your compose file:
environment:
DHCP: "Y"
devices:
- /dev/vhost-net
device_cgroup_rules:
- 'c *:* rwm'It is possible to pass-through disk devices or partitions directly by adding them to your compose file in this way:
devices:
- /dev/sdb:/disk1
- /dev/sdc1:/disk2Use /disk1 if you want it to become your main drive that will be formatted during installation, and use /disk2 and higher to add them as secondary drives that will stay untouched.
To pass-through a USB device, first lookup its vendor and product id via the lsusb command, then add them to your compose file like this:
environment:
ARGUMENTS: "-device usb-host,vendorid=0x1234,productid=0x1234"
devices:
- /dev/bus/usbTo share files with the host, add the following volume to your compose file:
volumes:
- ./example:/sharedThen start the container and execute the following command in ZimaOS:
mount -t 9p -o trans=virtio shared /mnt/exampleNow the ./example directory on the host will be available as /mnt/example in ZimaOS.
First check if your software is compatible using this chart:
| Product | Linux | Win11 | Win10 | macOS |
|---|---|---|---|---|
| Docker CLI | β | β | β | β |
| Docker Desktop | β | β | β | β |
| Podman CLI | β | β | β | β |
| Podman Desktop | β | β | β | β |
After that you can run the following commands in Linux to check your system:
sudo apt install cpu-checker
sudo kvm-okIf you receive an error from kvm-ok indicating that KVM cannot be used, please check whether:
-
the virtualization extensions (
Intel VT-xorAMD SVM) are enabled in your BIOS. -
you enabled "nested virtualization" if you are running the container inside a virtual machine.
-
you are not using a cloud provider, as most of them do not allow nested virtualization for their VPS's.
If you did not receive any error from kvm-ok but the container still complains about a missing KVM device, it could help to add privileged: true to your compose file (or sudo to your docker command) to rule out any permission issue.
See dockur/casa for a CasaOS container.
See dockur/umbrel for a UmbrelOS container.

