pantabox-edit-config -- edit configuration files for a container¶
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:
This launches a shell environment inside the Pantavisor configuration part.
This environment allows you to create files and folders inside
_config/nginx/ and when you're ready to add and commit those changes.
- In this example, let's create the NGINX config file
- After creating and editing the
nginx.conffile you can add and commit those changes:
pvr add .
Exit the interactive edit console, and press Ok to continue.
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.
After the changes have been applied, you can run the new revision.
pantabox is Copyright (c) 2021 by Pantacor Ltd.