Script for preloading balena OS images (.img
) with a user application container.
Using this will allow images with supervisor version above 1.0.0 to run the user application without connectivity, and without the need to download the container.
In order to preload images that use the overlay2 Docker storage driver (like
nvidia jetson tx2 for example), you need to load the overlay
Linux module:
sudo modprobe overlay
For other images you will need to have the aufs
module loaded.
The standalone mode described below (balena-preload) is now deprecated. It will be removed in a future release. You should use balena-cli instead.
Install balena-cli and run
balena help preload
.
$ npm install --global balena-preload
If you encounter any problem, you can open an issue
Docker on macOS has some speed issues with volumes. This makes this script slow, especially with Flasher Images.
This version will only work for balena OS versions 1.2 and later.
For versions earlier than 1.2 you will need to checkout commit 5d6d4607bffc98acdf649ce5328e2079dfb9c3d9
of this repo and then follow the steps below.
Since Docker for Mac removed support for the BTRFS storage driver (see docker/for-mac/issues/388), preloading images prior to balena OS 2.0 will require the older Docker toolbox setup with VirtualBox to function properly.