In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "can Docker container be saved after modification". In daily operation, I believe that many people have doubts about whether they can save Docker container after modification. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "can you save Docker container after modification?" Next, please follow the editor to study!
You can save it, and when you make changes to a container (by running a command in the container), you can save the changes to the container so that you can run the container from the latest state after saving next time.
The process of saving state in docker is called committing, which saves the difference between the old and new states, resulting in a new version. All changes made by docker in the container need commit to save to the elephant.
First use the docker ps-l command to get the id of the container after the ping command is installed. Then save the image as learn/ping.
1. Run docker commit to view a list of parameters for the command.
two。 You need to specify the ID of the container to be submitted for storage. (obtained through the docker ps-l command)
3. There is no need to copy the complete id, which can usually be distinguished by the first three or four letters. (very similar to the version number in git)
Command: $docker commit 698 learn/ping
After executing the docker commit command, the id number of the new version of the image is returned.
At this point, the study on "can you save the Docker container after modification" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.