I am currently developing a software which runs on up to 10 identical devices at once in a local network. Each device is an Ubuntu 18:04 machine with arm64 architecture. As the software requires ubuntu20:04 and it is not possible to upgrade the host, the software runs inside a docker container. So far, I always copied the entire project forlder to each device, created an image and ran it. It works but it is very time consuming and annoying.
I recently read an article about docker swarm so I was wondering, if I could deploy the image to all devices at once with it. I already created a swarm but I have some trouble setting everything up:
Every device has a USB device plugged in which I need to access inside the docker container. Within docker run I accomplished that with the ‘–device’ parameter. This however does not seem to be possible with swarm services as I read in some GitHub issues.
Is there any other way I can deploy the image to every device? I only need the automatic deployment of the images.
Some further information:
-
the docker container must continue to run even if the device temporarily looses connection to the network.
-
every device needs to use the host network (’–network host’)
-
I need to deploy from a different architecture amd64 ( I currently use buildx for that )
-
the network has no access to the internet
-
log files need to be stored persistent ( in volumes )
Thanks for some advice in advance