Caching python dependencies permanently on a 2152

Hello,

I am working with a customer who will have internet connection on installation of a docker container, but once the container is deployed the PLC will not have any connection to the internet. The issue is that if they need to perform updates to the code, the only way to do so with Python containers (that I have found) is to rebuild the image and re-deploy. When balena rebuilds the image it re-installs the dependencies, which it can not due to no internet connection. I see that Buildkit can do this in certain versions of docker, is there support for this in the version of Balena? How would I implement this if so?

Note: I would run this app on the core but a dependency wont install so I have to use a container :)

Hi Dan,

I think the answer to your question is "no", but one of our docker experts can correct me if necessary.

I came across [url="https://pythonspeed.com/articles/podman-buildkit/ "]this article[/url] about using Buildkit with Podman, which is a container engine that also does not (fully) support Buildkit. That article includes some tips on installing and using Buildkit as a daemon - I see there is a [url="https://github.com/moby/buildkit/releases"]Buildkit release[/url] for arm-v7, which may suit the AXC F 2152. So, it may be possible to use some of the techniques described there with Balena engine too.

Hey,

I usually build my containers outside the PLC and then just install them. If I need to build a container for ARM devices, I use qemu as emulator. It definitely makes things nicer. 

Another way is to build the base image first (dockerfile "FROM" "BASEIMAGE"). 

First you can build an image with your depencies and then use that with the code update. Then all dependencies should be present.

Hello Jan,

Is it possible to load images onto the controller without an internet connection? If it is possible to create my own image locally using qemu, and "transfer" it to my PLC via WinSCP then use it?

Thanks!