Manual Packaging
Package source components following the instructions below to prevent data, configuration, and log files outside the installation package from being lost.
Files to Be Migrated
File Name |
Common Path |
Description |
|---|---|---|
config.json |
${HOME}/.docker/ |
Configuration file, which stores the Docker client configuration information. |
daemon.json |
/etc/docker/ |
Docker daemon configuration file. |
http-proxy.conf |
/etc/systemd/system/docker.service.d/ |
Systemd service configuration file, which is used to set the HTTP proxy. |
Procedure
- Checks whether the configuration files exist.
1 2 3
find ${HOME}/.docker/ -name 'config.json' find /etc/docker/ -name 'daemon.json' find /etc/systemd/system/docker.service.d/ -name 'http-proxy.conf'
- If the configuration files are found and their absolute paths are returned, run the following commands to collect these configuration files.
- Create a temporary directory for storing the configuration files.
1mkdir -p ${HOME}/DockerConf
- Package the found configuration files in sequence.
1 2 3
tar -Pczvf ${HOME}/DockerConf/config.json.tar.gz ${HOME}/.docker/config.json tar -Pczvf ${HOME}/DockerConf/daemon.json.tar.gz /etc/docker/daemon.json tar -Pczvf ${HOME}/DockerConf/http-proxy.conf.tar.gz /etc/systemd/system/docker.service.d/http-proxy.conf
- Package the directory where the preceding packages are stored. Use DockerConf.tar.gz as an example:
cd /root && tar -czvf DockerConf.tar.gz DockerConf
- Create a temporary directory for storing the configuration files.
- Obtain the source components using either of the following methods:
- If you select the Upload source component package option, return to the Add Component Information tab, and click Upload next to Upload source component package to upload the source component package.
- If you select the Obtain from node server option, run the following command to decompress the source component package.
- Log in to the tool through SSH and upload the package to the user-defined directory on Target Node.
- Set the package path to Source Component Path, for example, /home/DockerConf.tar.gz.
- After the packaging is complete, delete the ${HOME}/DockerConf directory.
Parent topic: Packaging the Docker Source Components