×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

New docker containers for indiserver

  • Posts: 25
  • Thank you received: 8
I've just finished building a working set of docker containers for indiserver. This includes both x86 and Raspbian images. I've tested it on both platforms without any problems.

For those of you who haven't used Docker before, it's a really nice way to encapsulate and deploy a service along with all of its dependencies. For example, to run the indiserver with all the simulators with a stock RPI you just need to run the following command (no downloading or installing needed other than installing docker-engine)
docker run --rm -ti seanhoughton/indiserver:1.3.1

When the process is stopped (with ctrl-c in this case) the container is removed and your system is left in the same state as before you started it. No bit-rot, no dependency hell, etc. The image is cached locally so future runs start almost instantly. If you want to try a different version just change the version tag of the image and start it.

Links
If you find this useful let me know. If you've got any improvements please let me know.
The following user(s) said Thank You: Jasem Mutlaq, Radek Kaczorek, Derek
7 years 3 months ago #13343

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 5
Hi Sean,

Thanks for sharing. I just tested it on a fresh installed Ubunutu 16.04 Docker host and it works fine. For a quick (newbie) test I added --net=host to the command line to expose the INDI port. May be this helps other readers who, as I did, start testing before reading the chapter "Running the containers" ;)

Regards,
--Gerard
7 years 2 months ago #13349

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
That's very useful and unavoidable for the future. Thanks for this!
I believe that KStars and Ekos are great candidates for a docker (or similar container) as well. This will become more and more important for users of tablets with native linux (e.g. ubuntu) system onboard.
The following user(s) said Thank You: Jasem Mutlaq
7 years 2 months ago #13357

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 8
Hi Gerard,

I would suggest switching to the explicit port mappings with -p 7624:7624 instead of using the host network. Whitelisting ports reduces the "surface area" of your container and has some other benefits if you put more things into containers. Also, if you run each driver in its own container (something I'm prototyping now) you'll get port conflicts on the host network.

I'll take another stab at the readme. The first pass is kind of an information dump rather than a flowing doc.
7 years 2 months ago #13376

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 7
Hi Sean,
great contribution! Inspired by your first version I was also woking on a docker container image for the raspberrypi. There is a project "Hypriot" (blog.hypriot.com/) which provides SD card images for the raspberry with a docker framework already installed. I tried it and it works perfectly. There seems to be no measurable overhead of the container technology , it runs even on a raspberry 1. My current idea is to install the indiwebmanager on top of your container. It is then possible to start the docker container as a systemd service so that you dont have to know about starting containers with dockers at all ...

Klaus
Last edit: 7 years 2 months ago by Klaus Kretzschmar.
7 years 2 months ago #13420

Please Log in or Create an account to join the conversation.


This is really awesome, great job!! Is there any chance to create a container for KStars+INDI? What about updates and such? How are those handled?
7 years 2 months ago #13456

Please Log in or Create an account to join the conversation.

  • Posts: 41
  • Thank you received: 7
Afaik, you can add a version tag to your docker image. The cool thing is, that due to container isolation, you can run different versions of the INDI library on the same hardware. Special care has to be taken if you change the container, e.g. changing the config file, then you have to commit those changes in order to ensure that the changes don't get lost. It works a bit like git ... Though docker use special Linux kernel features (namespaces), you can run docker on Windows (>= 10) as well. They use the new embedded Linux virtualization on Windows 10 (however currently limited on windows 10 pro...). When windows supports Ubuntu > 14.04, this could be an intereting option to run native indiserver on windws ... just a thought.
7 years 2 months ago #13462

Please Log in or Create an account to join the conversation.

  • Posts: 25
  • Thank you received: 8
I'm still working through the best way to deal with keeping versions up to date. Currently I'm using dockerhub to automatically build the x86 containers. The "latest" tag is built with the "master" branch of the dockerfiles which use version=* while the 1.3.1 tag is built with the 1.3.1 branch which has version=1.3.1. dockerhub will rebuild the images anytime a change is committed to the inid-docker repo

Unfortunately dockerhub doesn't yet have automated builds for RPI images so I have to build/push them manually. I'm investigating CI server options for automating it.

I'll take a look at containers for kstars, but it might be more confusing for users due to file system isolation.
7 years 2 months ago #13476

Please Log in or Create an account to join the conversation.

Time to create page: 0.603 seconds