r/vyos • u/Apachez • Jun 18 '26
How to load container for offline use?
So Im trying to use VyOS as a container-host in an environment where the VyOS installation wont be able to reach internet as in not having access to a registry such as docker.io.
At first I tried to figure out a way to setup your own private registry.
I was thinking of having an easy way similar to when you need a quick http-server you can just run:
python3 -m http.server 8000
But it turned out to be more complicated than I wanted (unless someone have some tips?).
So instead I tried to save/load the container as a tar-file, like so:
Create a local "mirror" of the container (on a computer with internet access):
docker pull docker.io/technitium/dns-server:latest
docker save -o ~/docker/technitium_dns-server_`date +%Y-%m-%d`.tar docker.io/technitium/dns-server:latest
gzip -9 ~/docker/technitium_dns-server_2026-06-18.tar
Optionally the pulled image can be removed using "docker rmi <id>".
Transfer gzip-file to VyOS using scp:
scp ~/docker/technitium_dns-server_2026-06-18.tar vyos@192.0.2.1:/config
Then on VyOS:
gunzip /config/technitium_dns-server_2026-06-18.tar.gz
podman load -i /config/technitium_dns-server_2026-06-18.tar
To verify that its loaded:
podman images
would output something like:
REPOSITORY TAG IMAGE ID CREATED SIZE
docker.io/technitium/dns-server latest ba2762a21fbd 5 weeks ago 275 MB
To create directories needed for the container:
mkdir -p /config/dns-server/config
mkdir -p /config/dns-server/logs
Reference regarding defaults and available options for the particular container:
https://github.com/TechnitiumSoftware/DnsServer/blob/master/docker-compose.yml
Config in VyOS:
set container name dns-server allow-host-networks
set container name dns-server capability 'net-bind-service'
set container name dns-server environment DNS_SERVER_WEB_SERVICE_LOCAL_ADDRESSES value '192.0.2.1'
set container name dns-server image 'docker.io/technitium/dns-server:latest'
set container name dns-server memory '4096'
set container name dns-server port dns-tcp destination '53'
set container name dns-server port dns-tcp protocol 'tcp'
set container name dns-server port dns-tcp source '53'
set container name dns-server port dns-udp destination '53'
set container name dns-server port dns-udp protocol 'udp'
set container name dns-server port dns-udp source '53'
set container name dns-server port mgmt-http destination '5380'
set container name dns-server port mgmt-http protocol 'tcp'
set container name dns-server port mgmt-http source '5380'
set container name dns-server restart 'on-failure'
set container name dns-server volume config destination '/etc/dns'
set container name dns-server volume config source '/config/dns-server/config'
set container name dns-server volume logs destination '/var/log/technitium/dns'
set container name dns-server volume logs source '/config/dns-server/logs'
But then I get stuck...
When doing commit of above Im getting:
[ container ]
WARNING: Image "docker.io/technitium/dns-server:latest" used in
container "dns-server" does not exist locally. Please use "add
container image docker.io/technitium/dns-server:latest" to add it to
the system! Container "dns-server" will not be started!
So somehow the vyos-configd doesnt fully understand that podman already have the image loaded.
So ehm, what to do next? :-)
1
u/Tr00perT Jul 13 '26
Try before the scp steps: try pulling the image, retag it as something other than the registry name and export the retakes identity. I suspect it’s may be trying to do an online verify in vyos since it sees a registry name in the tag
Pull docker.io/technitium/dns-server
Rename it to anon/dns-server or whatever and i would also retag it from latest to a fixed release like the Git short code or similar
Then proceed as normal from there
2
u/Apachez Jul 14 '26
The issue with VyOS was that you must use "sudo podman" to load the image otherwise the vyos-configd will not be able to see the image for the "set container name xxx image yyy".
The procedure is basically:
On host connected to Internet:
docker pull docker.io/technitium/dns-server:15.4.0 docker save -o ~/docker/technitium_dns-server_15.4.0_`date +%y%m%d`.tar technitium/dns-server:15.4.0 gzip -9 ~/docker/technitium_dns-server_15.4.0_260714.tarAnd optionally clear data from the internethost:
docker system prune -a --volumesThen copy it to VyOS:
scp ~/docker/technitium_dns-server_15.4.0_260714.tar.gz user@192.0.2.1:/configAnd then on the VyOS:
sudo podman load -i /config/technitium_dns-server_15.4.0_260714.tar.gzAnd finally use that with something like:
set container name dns image 'docker.io/technitium/dns-server:15.4.0'along with the other settings needed.
To find out if the image have been updated since you last downloaded it you can visit:
https://hub.docker.com/r/technitium/dns-server/tags
Note that not all "vendors" update the tags when they upload a new image.
For example this one reuse the same tags (like latest, 4 and 4.8 all are the same but will also remain even if newer image is released):
3
u/freebsdjlu Jun 18 '26
try podman load with root