Docker images
The rhubarbe docker command (see the user guide)
runs a user container on top of a frisbee host image that has docker installed.
This page describes what the testbed needs to provide for that to work: where the
container images come from, and where they are stored.
Two services with different roles¶
Two services are involved, and a single registry process cannot play both roles:
| role | what it is for | writable | where |
|---|---|---|---|
| pull-through cache of Docker Hub | exposes the global images, Docker Hub’s, locally so that -i ubuntu is fast, like on a laptop | no, by design | [docker] mirror in rhubarbe.conf; currently http:// |
| private registry | where the images produced locally end up: rhubarbe docker save pushes there, and rhubarbe docker images lists it | yes, see below | [docker] registry; currently registry.pl.sophia.inria.fr |
The cache is optional: without a mirror setting, the nodes use Docker Hub
directly. Images from other registries, like quay.io/..., are not cached.
Where the registry runs¶
The registry is a standard registry:3 container, run on the docker host
stupeflip.pl.sophia.inria.fr, next to a caddy container that provides the
TLS certificate and the rules on who can write (see below). These containers are
managed with Portainer, at portainer.pl.sophia.inria.fr. Deletion of images is
enabled in the registry (REGISTRY_STORAGE_DELETE_ENABLED=true).
dockerhub.pl.sophia.inria.fr is an older name for the same registry, that is
being phased out.
How the nodes learn about them¶
The host images know nothing about registries. At rhubarbe docker load time,
once the host has booted, rhubarbe configures the engine of the node, from the
[docker] section of rhubarbe.conf:
docker:
registry-mirrors(andinsecure-registriesif the mirror is inhttp://) are merged in/etc/docker/daemon.json, and docker is restarted;podman, on fedora:
/etc/containers/registries.conf.d/rhubarbe.confis written, which also makes short image names search Docker Hub, like docker does.
So if the cache moves, it is enough to change [docker] mirror: no image has to be
rebuilt. The other keys of that section are registry, prefix (the namespace in
the registry, r2lab), host_image (docker by default, or podman) and
host_ssh_port (2222).
Who can write in the registry¶
reads are open to everybody;
pushes (
POST,PUT,PATCH) are accepted without authentication when they come from the testbed gateways (faraday, and the preplab for tests), which is where the nodes appear to come from, and only under/v2/r2lab/, our namespace;everything else needs basic-auth credentials of the
adminaccount: pushes from anywhere else, pushes outside of our namespace, and all deletions.
This is what the caddy container does, with a configuration like this one:
registry.pl.sophia.inria.fr, dockerhub.pl.sophia.inria.fr {
# allow the testbed to push images, based on their IP
@node_pushes {
method POST PUT PATCH
remote_ip <FARADAY_IP> <PREPLAB_IP>
path /v2/r2lab/*
}
@writes {
method POST PUT PATCH DELETE
}
handle @node_pushes {
reverse_proxy registry:6000
}
handle @writes {
basic_auth /v2/* {
# bcrypt hash, as produced by `caddy hash-password`
admin "<HASH>"
}
reverse_proxy registry:6000
}
# everyone can read
handle {
reverse_proxy registry:6000
}
}The credentials are deliberately not in rhubarbe.conf.local, which every
experimenter can read, as nodes are no place to keep a secret.
What this means in practice:
there are no per-user accounts: the registry has no notion of an image owner, and
r2lab/is a shared space, like the repository of frisbee images. Everybody who holds a lease is root on a node, and can thus push, and overwrite, any image underr2lab/, whoever created it;nobody but the admin can delete anything, and the other namespaces (
python-nodejs...) are out of reach of the nodes;from anywhere else, including a laptop, a push is refused.
Pushing from outside the testbed¶
On 2026-12-02 we tried this from another host of the same network that is not in
the list of gateways: writing to the registry is refused, with and without
our namespace (401, and unauthorized from docker push of a small image in
r2lab/). So a user cannot push an image built on a laptop; the only way
in today is from a node. A way to go, that has not been tried yet, would be to
copy the image to a node (docker save | ssh ... docker load, on port 2222
which is the ssh port of the host), and to push it from there with docker push.
Housekeeping¶
rhubarbe docker rmideletes images from our namespace, and is reserved to root; as deletions need credentials, setregistry_userandregistry_passwordin the[docker]section of root’s~/.rhubarbe.conf, mode 600. Deleting a tag deletes all the tags that point to the same image.disk space is only reclaimed by the garbage collection of the registry:
docker exec registry registry garbage-collect /etc/distribution/config.ymlon the docker host (there is none scheduled), andrhubarbe docker savecommits whole containers, so the images can be big;rhubarbe docker url [PATH]prints the URL of the registry API, to craft requests by hand, e.g.curl $(rhubarbe docker url)/_catalog.
What the host and container images must provide¶
Host images are frisbee images, docker (ubuntu) or podman (fedora), that must have:
docker, started at boot, so that the
dockercommand exists (on fedora,podman-dockerprovides it, asrhubarbealways callsdocker);the host sshd on port 2222, with root login like on the other nodes: port 22 is left to the container, that shares the network of the host;
ss, and systemd.
They must not contain anything about registries or mirrors, see above. They are built with the other images, see Frisbee images.
Container images can be any image from Docker Hub, quay.io or the private
registry. The container is started with -dit, is always called container, and
ssh fitNN lands in it. If the image has no sshd of its own, rhubarbe injects a
static dropbear, that is uploaded to the node and started in the container (it
needs a root user, /etc/shadow, sed and a shell, so no distroless images).
The binary is the dropbear setting of rhubarbe.conf, and is built with
docker/dropbear/build-dropbear.sh in the r2lab-imaging repo. As on the
nodes, there is no authentication in the container: access control is done
upstream by the gateway.
Testing¶
tests/docker_smoke.py in the rhubarbe repo runs the whole sequence on real
nodes: load, load -k, save and rmi. It needs a lease and takes about 10
minutes.