×
INDI Library v1.8.8 Released (09 Jan 2021)

Here are the changes from v1.8.7 to v1.8.8

New docker containers for indiserver

4 years 2 weeks ago
seanhoughton
Junior Member
Junior Member
Posts: 25
More
Topic Author
New docker containers for indiserver #13343
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 knro, Kaczorek, dokeeffe

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

4 years 2 weeks ago
gerardvs
Junior Member
Junior Member
Posts: 27
More
New docker containers for indiserver #13349
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

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

4 years 2 weeks ago
Kaczorek
Moderator
Moderator
Posts: 966
Karma: 6
More
New docker containers for indiserver #13357
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.

--
Radek Kaczorek
Astroberry Server | NEQ6 | Atik 460EX | Atik EFW2 | ASI 120MM
The following user(s) said Thank You knro

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

4 years 2 weeks ago
seanhoughton
Junior Member
Junior Member
Posts: 25
More
Topic Author
New docker containers for indiserver #13376
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.

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

4 years 2 weeks ago 4 years 2 weeks ago by kkretzsch.
kkretzsch
Senior Member
Senior Member
Posts: 41
Karma: 1
More
New docker containers for indiserver #13420
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

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

4 years 2 weeks ago
knro
Administrator
Administrator
Posts: 8730
Karma: 51
New docker containers for indiserver #13456

seanhoughton wrote: 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.


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?

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

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

4 years 2 weeks ago
kkretzsch
Senior Member
Senior Member
Posts: 41
Karma: 1
More
New docker containers for indiserver #13462

knro wrote: What about updates and such? How are those handled?

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.

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

4 years 2 weeks ago
seanhoughton
Junior Member
Junior Member
Posts: 25
More
Topic Author
New docker containers for indiserver #13476
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.

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

Time to create page: 0.793 seconds