Skip to content

pantabox-edit-config -- edit configuration files for a container




The edit configuration command allows you to edit the mounted volume for a specific container. In Pantavisor Linux every container has a _config/container_name folder. When you add new config files using the container filesystem structure, any existing config files inside the container are overwritten.


In this example, we'll configure an NGINX container. This could be an alpine base container with an NGINX configuration that lives inside /etc/nginx/nginx.conf. In this case, you can create a _config overlay with a new config file that overwrites any other inside the container.

That config file is located at _config/nginx/etc/nginx/nginx.conf. The file can change the configuration of NGINX so that every time you make a change, it creates a new revision. It does this without having to change the base NGINX container or without you having to create and maintain another volume.

To see how this works:

  1. Run pantabox-edit-config and select nginx

running pantabox edit config and select nginx

This launches a shell environment inside the Pantavisor configuration part.

shell environment for changing configuration

This environment allows you to create files and folders inside _config/nginx/ and when you're ready to add and commit those changes.

  1. In this example, let's create the NGINX config file _config/nginx/etc/nginx/nginx.conf

nginx.conf file content

  1. After creating and editing the nginx.conf file you can add and commit those changes:

pvr add . pvr commit exit 0

commit changes

Exit the interactive edit console, and press Ok to continue.

confirmation that your are done with changes

Now you can see the new state.json file generated by the changes you made on the config. Confirm the changes to apply them to the device.

confirm changes on state

After the changes have been applied, you can run the new revision.

running new revision

pantabox is Copyright (c) 2021 by Pantacor Ltd.