This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interesting video about docker
#1
Anyone played with docker on a pi? Does it slow things down? Looks interesting.
https://youtu.be/a6mjt8tWUws

Sent from my SM-T813 using Tapatalk
Reply
#2
I ran my SK Server + InfluxDB + Grafana combo this past season in Docker. No performance issues. A bit of trouble with device permissions.

It makes some things easy/irrelevant, for example Node.js is inside the container so upgrading is just pulling (downloading) a newer container.

My current setup does not use GPIO, so I do not know how that works.

I also tried balena.io (that is Docker based) on another boat past summer. That worked very well. There is no Raspbian with Balena, just Balena OS that runs the container and provides remote management via their system. Free for a few devices.

For remote access I recommend ZeroTier. The main advantage is that you do not need a public ip address.
Reply
#3
Thanks. I'll have a play. What about running signalk-server on windows in docker? Does that work ok? Might be a way to drag the masses running a win laptop onboard into the wonderful world of signalk. Smile

Sent from my SM-T813 using Tapatalk
Reply
#4
Also, away from openplotter a bit but would this work..?

Circuit Board on EasyEda with some sensors and an esp, docker image of visual studio code with everything needed and a sketch which runs on the esp - then anyone can buy the circuit boards from jlcpcb, download the docker image and just have to click upload to have a working sensor board sending data to signalk?
Reply
#5
(2019-10-30, 06:54 PM)PaddyB Wrote: Also, away from openplotter a bit but would this work..?

Circuit Board on EasyEda with some sensors and an esp, docker image of visual studio code with everything needed and a sketch which runs on the esp - then anyone can buy the circuit boards from jlcpcb, download the docker image and just have to click upload to have a working sensor board sending data to signalk?

Docker containers do not have access to a display, so typically you don't use it with applications that have a GUI like VS Code.

The Docker way for this would be to create/use a container image that has the command line / non GUI tools for compiling the sketch and uploading the image to your board. Or precompile and include the binaries in the image, then you need only the upload part.

https://hub.docker.com/r/arduino/arduino-cli seems to include everything needed. The readme is confusing, as it is for the arduino-cli tool, not the Docker image.


If you want to try this stuff out I would first make things work with (locally installed) arduino-cli, then start figuring out how it would work on top of Docker.
Reply
#6
OK, thanks. Seems docker isn't that straightforward to install on windows home or below so maybe not the best way to get code onto a non computer literate sailors EPS anyway.
Reply
#7
(2019-10-31, 10:20 AM)PaddyB Wrote: OK, thanks. Seems docker isn't that straightforward to install on windows home or below so maybe not the best way to get code onto  a non computer literate sailors EPS anyway.

In the next W10 release, Debian linux (and others) will work natively thanks to their WSL2 implementation. A simple download from the Microsoft Store and it will work. MS managed to integrate a real Linux kernel, Docker runs fine on it, no need per se for Docker desktop for Windows but it will be a nice GUI for managing the virtualized Linux containers.
I played with it because my Windows 10 is on the Insider build program.

link: https://www.google.com/search?q=wsl2+docker
Reply
#8
(2019-10-30, 06:44 AM)tkurki Wrote: I ran my SK Server + InfluxDB + Grafana combo this past season in Docker. No performance issues. A bit of trouble with device permissions.

It makes some things easy/irrelevant, for example Node.js is inside the container so upgrading is just pulling (downloading) a newer container.

My current setup does not use GPIO, so I do not know how that works.

I also tried balena.io (that is Docker based) on another boat past summer. That worked very well.   There is no Raspbian with Balena, just Balena OS that runs the container and provides remote management via their system. Free for a few devices.

For remote access I recommend ZeroTier. The main advantage is that you do not need a public ip address.

hi there

I really like balenaOS and their container-based system - would you mind sharing how you built and deployed the container?

Would you end up running a Raspbian container on BalenaOS or a native one - not quite sure how to proceed but very keen  Huh Smile Idea

https://github.com/openplotter/pi-gen
Reply
#9
I think it was this Dockerfile that I used https://github.com/tkurki/signalk-server...60c94a30d2

So essentially use Balena Alpine Node base image and install SK server like you would normally with npm.

If there’s interest we could bring that Dockerfile into master as it is just one file. If more people use it we could iron out any glitches together.


Sent from my iPhone using Tapatalk
Reply
#10
In case anyone's interested here's my one liner for launching signalk in docker with permissions needed for host network access (port 8080) and having logs and config in host filesystem, under /var:

I run on port 8080 so as not to clash with grafana.

Code:
docker run -d --name signalk-server --publish 8080:3000 --network="host" --log-opt max-size=10m --log-opt max-file=10 -v --privileged -v /var/signalk:/home/node/.signalk -v /var/signalk/logs:/logs -v /dev:/dev/hostdev signalk-local
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)