Migrate Clear Containers to Kata Containers*
Clear Containers and Kata Containers can co-exist in the same system.
Both can be installed through the
containers-virt bundle. However, we
recommend that you migrate to Kata Containers because Clear Containers is no
longer maintained and will soon be deprecated on Clear Linux* OS.
This guide describes how to migrate to Kata Containers and assumes that:
- Clear Containers is on a Docker* system.
- Kata Containers is installed. See Kata Containers*.
Stop Clear Containers instances
As an unprivileged user, stop all running instances of Clear Containers:
for container in $(sudo docker ps -q); do sudo docker stop $container; done
Manually migrate customized configuration files
Make any required changes before continuing this process.
You do not need to manually remove any Clear Containers packages.
Enable Kata Containers as default
Configure Docker to use the Kata Containers runtime by default.
sudo mkdir -p /etc/systemd/system/docker.service.d/ cat <<EOF | sudo tee /etc/systemd/system/docker.service.d/51-runtime.conf [Service] Environment="DOCKER_DEFAULT_RUNTIME=--default-runtime kata-runtime" EOF
Restart the Docker systemd services.
sudo systemctl daemon-reload sudo systemctl restart docker
Verify Docker is using Kata Containers.
sudo docker info | grep -i 'default runtime' Default Runtime: kata-runtime
Run Kata Containers
Use the following command:
sudo docker run -ti busybox sh
You’ve successfully migrated from Clear Containers to Kata Containers.