Creating a Base Data Volume
Confirm or adjust the default image name and data volume storage directory as required. Delete or back up the existing data volume. After that, extract the startup script, set permissions, and run the script to start a cloud phone and pre-install an application. Finally, delete the initial container.
- Determine the directory where the data volume is stored and the image name.The default image name is video:latest, and the default directory for storing the data volume is /home/mount. You can change the values of DOCKER_IMAGE and USERDATA in the cfct_config file to the actual name and directory, respectively.
1 2
DOCKER_IMAGE=video:latest USERDATA="/home/mount"
- Delete the original data volume or back up the data volume to another location. {USERDATA} indicates the directory for storing the data volume configured in 1. If there are multiple directories, perform the following operations in this section for each directory.
1rm -rf ${USERDATA}/data/android_base
- Extract the cfct_video startup script from DemoVideoEngine.tar.gz and grant permissions on the script. Ensure that the file owner has the read, write, and execute permissions while users in the owner group and other users have only the read and execute permissions.
1 2 3
cd /home/kbox_video/ tar -xvf DemoVideoEngine.tar.gz cfct_video chmod 755 cfct_video
- Use the cfct_video script to start a cloud phone.
1./cfct_video start ${index}
- Pre-install an app (for example, Subway Surfers) in the cloud phone container, and use android_${index} as a new data volume for starting the video stream cloud phone.
1 2
cd ${USERDATA}/data/ cp -rp android_${index} android_base
- Delete the android_${index} container.
1 2
cd /home/kbox_video/ ./cfct_video delete ${index}
Parent topic: Deploying a Cloud Phone