Create A Custom Container; Create The Custom Container File - Digi IX10-00G4 User Manual

Table of Contents

Advertisement

Containers
8. Disable the sandbox. Sandbox restrictions are not necessary when a container is used.
(config system schedule script 0)> sandbox false
(config system schedule script 0)>
9. Save the configuration and apply the change:
(config)> save
Configuration saved.
>
10. Type exit to exit the Admin CLI.
Depending on your device configuration, you may be presented with an Access selection
menu. Type quit to disconnect from the device.

Create a custom container

This example creates a simple custom container that contains a python script in the /etc directory.
In this example, we will use a simple container file named test_lxc.tgz. You can download
from the Digi website.
At the command line of a Linux host, we will unpack the file, add a simple python script, and create a
new container file that includes the python script.

Create the custom container file

1. At the command line of a Linux host, unpack the test_lxc.tgz file:
$ tar -xfv test_lxc.tgz
rootfs/
rootfs/usr/
rootfs/etc/
rootfs/etc/group
rootfs/etc/profile
rootfs/etc/passwd
rootfs/tmp/
$
2. Change to the rootfs/etc directory:
$ cd rootfs/etc
$
3. Create a file named test.py with the following contents:
print("Hello world.\n")
4. Change directories to leave the container file structure:
$ cd ../..
IX10 User Guide
Create a custom container
test_lxc.tgz
696

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ix10Ix10-00n4

Table of Contents