A Digi Container Package (DCP) is a tarball that includes an LXC or OCI (Docker/Podman) container image plus a manifest with information for the ConnectCore Container Manager daemon to manage it during its life cycle (version, runtime arguments, restart options…)
1. Create a DCP from an existing container image
1.1. Create the manifest
Create a file ~/container-demo/manifest.json in your working directory with the following contents:
Example
manifest.json{
"package_id": "redis-demo",
"friendly_name": "Redis Demo",
"version": "1.0",
"runtime": "podman",
"create_args": "--privileged --network host --tty",
"registration_defaults": {
"autostart": true,
"monitor": true,
"restart": {
"enabled": true,
"max_retries": 3,
"window": 60,
"retry_delay": 3
}
},
"device_types": ["ccimx95-dvk"],
"firmware_versions": "",
"build_id": "",
"description": "Redis demo image from docker.io",
"labels": {}
}
1.2. Generate the DCP
Run the following Python script and pass the payload (container image tarball) and manifest as arguments:
$ cd ~/container-demo
$ python3 /usr/local/dey-5.0/sources/meta-digi/meta-digi-containers/scripts/generate-dcp.py \
--manifest manifest.json \
--payload redis.tar
This generates an artifact with a filename such as redis-demo-podman-ccimx95-dvk.tar.gz.
| For detailed information about Digi Container Package and its manifest see Digi Container Package (DCP). |