How to use an authenticated docker registry

I’m trying to install an app from docker using a private docker registry (hosted by gitlab). This registry requires that I login but I can’t find a way to login from pantavisor. I’m in the pvr-sdk app and there’s no docker command and I don’t see anything in the pantabox app to handle this either.

Hi tclarke, how are you exactly trying to update your device? pantabox (ssh), web UI or pvr (CLI tool)?

About using a private container image, you can do that by using pvr. With the options -u and -p, it is possible to set credentials for a private docker registry. See pvr app add --help.

pvr device scan shows no devices detected. Currently running in vmware with x64-uefi image. Running the scan in the main pantabox login or pvr-sdk app shows nothing. Running in a second linux vm shows nothing as well. I added a second nic to both vms in the same lan segment and can ping each from the other and that didn’t help either.

The pvr scan command might be failing because of some network problem in your setup. You can find some troubleshooting guidelines in our documentation.

We can try other ways though:

  • If the device has access to the Internet, then you can try claiming it using pantabox. Then you can clone through Pantacor Hub from any host. This would be the easiest way to get this done.
  • You can also try manually (in pvr-sdk, the paths will be /pantavisor/challenge and /pantavisor/device-id). If those are empty, then that means the device cannot reach the hub.
  • If both of the previous methods failed, you can also try to clone/post directly from your host. First, you need to open the port for local clone. Than can be done with pantabox. Then, if you can ping the IP of the device, you should be able to clone it with pvr.

Let me know if you need further help :slight_smile:

I’m not seeing anything in the challenge or device-id files. I’m behind a corporate firewall but I put the intercept CA certificates in the system (/usr/local/share/ca-certificates and ran update-ca-certificates) and I can curl https://google.com without cert errors. Are there logs somewhere I can reference to see what’s failing when trying to reach the hub?

Yeah, logs should be in this location:

/storage/logs/current/pantavisor/pantavisor.log

Hey tclarke,

I recommend to use the pvr-sdk from outside, not inside.

For that change in your grub and add pvrsdk_httpd_listen=0.0.0.0 to bootargs so that the webservice of pvr-sdk is getting opened up to outside … once booted you can now clone your device through pvr using pvr clone YOUR.DEVICE.IP.

Then you can use
pvr app add --from=nginx:latest nginx

in that directory to add a new container from a docker registry.

If you dont have a registry you can also use

pvr app add --source=local --from=nginx:latest nginx

This would then try to find the docker image in your local running docker rather than a remote registry.

To push this to your device after adding, you would run:

pvr add
pvr commit
pvr post -m "adding nginx"

As an update, this latest worked. I was able to use pvr from another VM to the pantavisor VM and install an app from an internal gitlab. I was not able to figure out how to change the grub config but I did Edit from the grub menu and add the bootarg. I have to do this each time it boots.

You can edit the grub.cfg on the boot partition to make this persistent …

You can also open the webservice updating you device to a new revision. In your cloned device:

mkdir -p _config/pvr-sdk/etc/pvr-sdk/
echo "{"httpd":{"listen":"0.0.0.0","port":"12368"}}" > _config/pvr-sdk/etc/pvr-sdk/config.json
pvr add .
pvr commit
pvr post -m "opening pvr-sdk webservice"