Home > Article > Operation and Maintenance > How to solve the error when upgrading docker to 1.9
Docker is currently the leading containerization technology and is widely used by many companies in production environments due to its efficiency and ease of use. However, the Docker upgrade process sometimes encounters various problems. One of the common problems is errors during the upgrade process.
Many people have reported recently that they encountered problems when upgrading Docker to version 1.9. This article explains how to resolve this issue.
Problem Description
When executing the upgrade script, the following error message will be output:
FATA[0000] Error response from daemon: Cannot stop container:
After Docker was upgraded to 1.9, the file system used in the container was switched from AUFS to Btrfs due to changes in the underlying storage. During the process of switching file systems, sometimes the file system cannot be unmounted. At this point, the upgrade process cannot continue.
Solution
The following are some common solutions:
Method 1: Find and stop the process occupying the file system
Use the following command to find the occupation The process of this file system:
sudo fuser -m
Where,
Use the following command to stop the process:
sudo kill -9
Then, run the upgrade script again.
Method 2: Temporarily stop the file system
Use the following command to temporarily stop the Btrfs file system:
sudo umount -l
Then run Just upgrade the script.
Method 3: Stop all containers and delete the Btrfs file system
Use the following command to stop all containers and delete the Btrfs file system:
docker stop $(docker ps -a - q)
sudo rm -rf
Then run the upgrade script.
Note: Before deleting the Btrfs file system, please make sure all data has been backed up!
Summary
Encountering errors when upgrading Docker is a common problem. In this article, we introduce some solutions that may be useful to you. During the upgrade process, be sure to handle data with caution, back up your data, and back up your system before upgrading. This way, if something goes wrong, you can easily roll back to a previous state.
I hope this article can help you solve the problems that arise during the Docker upgrade process.
The above is the detailed content of How to solve the error when upgrading docker to 1.9. For more information, please follow other related articles on the PHP Chinese website!