Skip to main content

Docker Tips & Tricks

SPR runs inside of containers. It can run a network inside of a network namespace, or with the host network namespace. Here are some useful things to know

Virtual mode

Super ships with 3 docker compose files

  • docker-compose.yml the default for running SPR on the host network
  • docker-compose-virt.yml for running SPR in virtual bridge, for example for a cloud VPN
  • docker-compose-test.yml for running the end to end tests

If using SPR in virtual mode, make sure to use the virtual compose file.

docker compose -f docker-compose-virt.yml up -d

Updating from the command line

sudo -s
cd /home/spr/super/
docker compose pull
docker compose up -d

Listing running containers

docker ps
root@haxlab0:/home/spr/super# docker ps
ad9f3a4aa353 "/bin/sh -c /scripts…" 17 seconds ago Up Less than a second superwifid
e509fed11404 "/scripts/" 28 seconds ago Up 1 second superwireguard
5b0cec25f671 "/scripts/" 28 seconds ago Up 2 seconds super_multicast_udp_proxy
746c2599eb42 "/scripts/" 28 seconds ago Up 2 seconds superdb
63c30c8dbc83 "/scripts/" 28 seconds ago Up 2 seconds superplugin-lookup
8c54ec9f1769 "/scripts/" 39 seconds ago Up 4 seconds superapi
a1679ce36ca4 "/scripts/" 39 seconds ago Up 4 seconds superdhcp
a69a08569bd8 "/scripts/" 39 seconds ago Up 4 seconds superdhcp_client
4ca730f9cf84 "/bin/sh -c /scripts…" 39 seconds ago Up 4 seconds superdns
d5ff0bd8d40d "/bin/sh -c /scripts…" 50 seconds ago Up 5 seconds superbase
fc8006db1370 "/scripts/" 50 seconds ago Up 5 seconds superd
e58a351190b1 "/scripts/" 50 seconds ago Up 5 seconds superpacket_logs
8a94e9476931 spr-nexmon-nexmon "/scripts/" 4 weeks ago Up 3 days supernexmon

Viewing logs

docker compose logs -f wifid
root@haxlab0:/home/spr/super# docker compose logs -f wifid
superwifid | % Total % Received % Xferd Average Speed Time Time Time Current
superwifid | Dload Upload Total Spent Left Speed
100 6 100 6 0 0 65 0 --:--:-- --:--:-- --:--:-- 65
superwifid | wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
superwifid | wlan1: interface state COUNTRY_UPDATE->HT_SCAN

Entering a container

docker exec -it superapi bash
root@haxlab0:/# ip -br addr
lo UNKNOWN ::1/128
eth0 UP fe80::e65f:1ff:fefd:a175/64
wlan1 UP fe80::9618:65ff:fe55:54ae/64
tailscale0 UNKNOWN fe80::31cf:a08b:d7e0:47e4/64
docker0 DOWN fe80::42:1ff:fea3:7057/64
tailscale DOWN
mon0 DOWN
sprloop UNKNOWN fe80::6416:d1ff:fe70:bf2a/64

Release Channels

Want to test the dev branch? Don't want to build it? You can use the -dev RELEASE_CHANNEL

docker compose pull

Starting plugins without the api/superd

The SUPDERDIR path is required to let docker compose know where the state and config directories are.

export SUPERDIR=/home/spr/super/
docker compose -f plugins/plugin/docker-compose.yml up -d

Building super

For convenience, we provide a script, that will build the containers.

Building with low system memory

To speed up the build a ramdisk is used from docker's buildkit. If that's not possible, consider disabling that capability

./ --set "*.args.USE_TMPFS=false"