Quickstart
From a fresh install to a web server running in a
virtual machine. Every command talks to the daemon’s socket, which belongs
to root, so they are run with sudo.
Create a network
Instances need a network to be attached to. Create one, with a private subnet of your choice:
$ sudo dicer network create default --subnet 172.20.0.0/16
Its gateway is the subnet’s first address, 172.20.0.1, on a bridge the
daemon creates. See Networking.
Import a kernel
A container image has no kernel; a virtual machine needs one. Import Dicer’s kernel, a long-term Linux release built for Dicer’s guests:
$ sudo dicer kernel import linux-6.18 --arch x86_64 \
--url https://github.com/konradasb/dicer-kernel/releases/download/v6.18.53-1/vmlinux-x86_64 \
--sha256 ca5db6c291deb8a409db1f1ab14cc55ef6d35504daf17fc0f5577ffc1662b669
It is downloaded the first time an instance boots with it, and checked against the checksum. See Kernels.
Run an image
With one network and one kernel, instances use them without being told:
$ sudo dicer run --name web -p 8080:80 nginx:1.27
Instance web started in 1.1s (172.20.61.102)
Dicer pulled nginx:1.27, converted it to a disk, and booted it as a
virtual machine, with its port 80 published on the host’s port 8080.
Reach it
From another machine, or from the host by the host’s own address:
$ curl -sI http://192.0.2.10:8080 | head -1
HTTP/1.1 200 OK
Published ports are not reachable through localhost on the host itself;
from the host, use its address or the guest’s, which dicer run printed.
Look inside
$ sudo dicer ps
$ sudo dicer logs web
$ sudo dicer exec web
dicer logs shows the guest’s console: the kernel booting, then nginx.
dicer exec opens a shell in the guest; exit leaves it.
Clean up
$ sudo dicer stop web
$ sudo dicer rm web