Skip to content

Add Apps from Docker

An app is a container that can be run in a Pantavisor device and that contains the application level functionality of the device.

IMPORTANT: This process will install an app runlevel container by default. This means new revisions with changes in this app will perform with the behaviour described in the runlevel reference. It will have an effect on how Pantavisor chooses to fully reboot the board or not depending on the changes. If what you need is a root runlevel container instead, follow the instructions in that reference and use the pvr app add --runlevel option to configure it.

To get started you would use pvr app add to add a new app to your stystem:

pvr app add --from nginx webserver

This will generate a webserver/ folder with a matching src.json for you. It will also automatically run the pvr app install command which can also run manually to produce fresh runtime artifacts from the source description:

pvr app install webserver

Once run you can inspect the produced output and use pvr to commit and post then to one of your devices:

# check status of files on disk
$ pvr status
? webserver/lxc.container.conf
? webserver/root.squashfs
? webserver/root.squashfs.docker-digest
? webserver/run.json
? webserver/src.json

# add new files to pvr control
$ pvr add .

# commit new files
$ pvr commit
Adding webserver/lxc.container.conf
Adding webserver/root.squashfs
Adding webserver/root.squashfs.docker-digest
Adding webserver/run.json
Adding webserver/src.json

# post changes to your device
$ pvr post

To ensure that runtime bits are 100% reproducible we include the concrete docker digest that pvr consumed during app add/install in the src.json.

In order to get the latest bits by docker name (e.g. for instance if the branch tag has been changed or moved forward) use pvr app update:

# update to latest "nginx:latest"
$ pvr app update webserver
Application updated

# confirm that therer were changes
$ pvr status
C webserver/src.json

# commit etc.
$ pvr commit
Committing /tmp/ppp/api2-canary-01/.pvr/objectswebserver/src.json