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 networkdocker-compose-virt.yml
for running SPR in virtual bridge, for example for a cloud VPNdocker-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
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ad9f3a4aa353 ghcr.io/spr-networks/super_wifid:latest "/bin/sh -c /scripts…" 17 seconds ago Up Less than a second superwifid
e509fed11404 ghcr.io/spr-networks/super_wireguard:latest "/scripts/startup.sh" 28 seconds ago Up 1 second superwireguard
5b0cec25f671 ghcr.io/spr-networks/super_multicast_udp_proxy:latest "/scripts/startup.sh" 28 seconds ago Up 2 seconds super_multicast_udp_proxy
746c2599eb42 ghcr.io/spr-networks/super_db:latest "/scripts/startup.sh" 28 seconds ago Up 2 seconds superdb
63c30c8dbc83 ghcr.io/spr-networks/super_plugin-lookup:latest "/scripts/startup.sh" 28 seconds ago Up 2 seconds superplugin-lookup
8c54ec9f1769 ghcr.io/spr-networks/super_api:latest "/scripts/startup.sh" 39 seconds ago Up 4 seconds superapi
a1679ce36ca4 ghcr.io/spr-networks/super_dhcp:latest "/scripts/startup.sh" 39 seconds ago Up 4 seconds superdhcp
a69a08569bd8 ghcr.io/spr-networks/super_dhcp_client:latest "/scripts/client.sh" 39 seconds ago Up 4 seconds superdhcp_client
4ca730f9cf84 ghcr.io/spr-networks/super_dns:latest "/bin/sh -c /scripts…" 39 seconds ago Up 4 seconds superdns
d5ff0bd8d40d ghcr.io/spr-networks/super_base:latest "/bin/sh -c /scripts…" 50 seconds ago Up 5 seconds superbase
fc8006db1370 ghcr.io/spr-networks/super_superd:latest "/scripts/startup.sh" 50 seconds ago Up 5 seconds superd
e58a351190b1 ghcr.io/spr-networks/super_packet_logs:latest "/scripts/startup.sh" 50 seconds ago Up 5 seconds superpacket_logs
8a94e9476931 spr-nexmon-nexmon "/scripts/startup.sh" 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 127.0.0.1/8 ::1/128
eth0 UP 192.168.2.218/30 fe80::e65f:1ff:fefd:a175/64
wlan1 UP fe80::9618:65ff:fe55:54ae/64
tailscale0 UNKNOWN fe80::31cf:a08b:d7e0:47e4/64
docker0 DOWN 172.17.0.1/16 fe80::42:1ff:fea3:7057/64
tailscale DOWN 172.18.0.1/16
mon0 DOWN
wlan0 UNKNOWN
sprloop UNKNOWN 192.168.200.1/32 fe80::6416:d1ff:fe70:bf2a/64
wg0 UNKNOWN
root@haxlab0:/#
Release Channels
Want to test the dev branch? Don't want to build it? You can use the -dev
RELEASE_CHANNEL
export RELEASE_CHANNEL=-dev
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, build_docker_compose.sh
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
./build_docker_compose.sh --set "*.args.USE_TMPFS=false " --load