Container Image Migration Functions
Command Function
Performs container image migration by analyzing the user-exported image package and Dockerfile, and generates a migrated Dockerfile, image build resource files, and a compatibility analysis report.
Container migration can be performed using the CLI or WebUI.
- (Recommended) CLI: Based on the image package and Dockerfile provided by the user, the tool automatically generates a migrated Dockerfile and a compatibility scanning report to help build Arm-based images efficiently.
- WebUI: The tool provides container deployment capabilities only and does not perform analysis on the original images.
Syntax
1 | devkit sys-mig [-h | --help] {-c container_mig | --command container_mig} {-i image_path | --image image_path} [-dockerfile dockerfile_path | --dockerfile dockerfile_path] [-o report_dir | --output report_dir] [-l {0,1,2,3} | --log-level {0,1,2,3}] |
Parameter Description
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
(Optional) Obtains help information. |
-c/--command |
stmt/sbom/mvn_analyse/container_mig |
(Mandatory) Information collection mode.
|
-i/--image |
- |
(Mandatory) x86 image package to be migrated. It can be exported by running docker save. Example: /home/image-centos.tar NOTE:
This parameter is required when -c is set to container_mig. |
-dockerfile/--dockerfile |
- |
(Optional) Dockerfile used to build the image. Example: /home/Dockerfile-image-centos |
-o/--output |
- |
(Optional) Report output directory, which defaults to the report directory where the sys-mig binary file is located. Example: /home/report |
-l/--log-level |
0/1/2/3 |
Log level, which defaults to 1. This parameter is optional.
|
Example
devkit sys-mig -c container_mig --image /home/demo/os_image/my-test-image-centos-3.tar --dockerfile /home/demo/os_image/Dockerfile-my-test-image-centos-3 -l 0
The following information is displayed:
debug: Enter the second level command: sys-mig [2026-05-19 19:31:54,499] [INFO] Creating file indexing... [2026-05-19 19:31:54,499] [INFO] Parsing... The analysis may take some time if the source package is large or has many files. Please wait... Scanning start time: 2026/05/19 19:31:54 [2026-05-19 19:31:54,499] [INFO] Start container migration process. [2026-05-19 19:31:54,499] [INFO] input image: /home/demo/os_image/my-test-image-centos-3.tar [2026-05-19 19:31:54,499] [INFO] input dockerfile: /home/demo/os_image/Dockerfile-my-test-image-centos-3 [2026-05-19 19:31:54,500] [INFO] log_level: 0 [2026-05-19 19:31:54,500] [INFO] output: /home/demo/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report [2026-05-19 19:31:54,559] [INFO] Start to parse dockerfile... [2026-05-19 19:31:54,562] [INFO] Dockerfile base image is specified to AMD64. [2026-05-19 19:31:54,562] [INFO] Dockerfile specified base image is not in the whitelist. Will check if base exists: centos:7 Parse image package metadata and layer information [2026-05-19 19:31:54,563] [INFO] Start to perform image analysis. [2026-05-19 19:31:54,564] [INFO] Start to unzip image package to target directory: /home/demo/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report/container_parser_work/image_rootfs. ... Generating the migration report [2026-05-19 19:32:58,438] [INFO] Generating Migration Report and Output Bundle: [2026-05-19 19:32:58,439] [INFO] Start to generate migration report... [2026-05-19 19:32:58,439] [INFO] Generate scan report file start. [2026-05-19 19:32:58,486] [INFO] Generating Migration Report and Output Bundle Successful. Configuration Input Path: /home/demo/os_image/my-test-image-centos-3.tar Output Path: /home/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report/sys-mig_xx.xx.xx.xx_20260519193154 Mode: dockerfile_and_image Image: my-test-image-centos-3:latest OS: CentOS Linux 7 (Core) Dockerfile: /home/demo/os_image/Dockerfile-my-test-image-centos-3 Statistics on Files to Be Migrated Dependencies Total Files: 11 Adaptable for Compatibility: 10 To Be Confirmed: 1 Migration task status: Success The container image migration assessment was successful. Resolve the dependencies according to the migration report, and include the relevant content in the output resource package. Next, in the build environment, use the local image build tool to rebuild the image from the resource package. For the details information, please check: /home/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report/sys-mig_xx.xx.xx.xx_20260519193154/Container_Mig_20260519193154_zh.json /home/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report/sys-mig_xx.xx.xx.xx_20260519193154/Container_Mig_20260519193154_en.json /home/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report/sys-mig_xx.xx.xx.xx_20260519193154/Container_Mig_20260519193154.html Generated dockerfile: /home/DevKit-CLI-26.1.RC1-Linux-Kunpeng/sys-mig/report/sys-mig_xx.xx.xx.xx_20260519193154/Dockerfile
After the container image is migrated, address any dependency compatibility issues identified in the migration report, and then rebuild the image. For details, see Rebuilding an Image.
- For the details information indicates the migration report path.
- Generated dockerfile indicates the Dockerfile output result path.