If the developer uses Dockerfile to build the image, they can also declare the data volume when building the image, for example:
In this way, an anonymous data volume is configured. During operation, data is written to the /usr/share/nginx/html/ directory, which can achieve stateless changes in the container storage layer. View all data volumes Use the following command to view all data volumes: docker volume ls As shown in the figure: View data volume details You can view data details according to the volume name, as follows: docker volume inspect The execution result is as follows: Deleting a Data Volume You can use the docker volume rm command to delete a data volume, or you can use docker volume prune to delete data volumes in batches, as follows: During batch deletion, all data volumes were not deleted, and one was left. This is because the data volume is still in use. Stop and remove the related containers, and then delete the data volume again to successfully delete it, as shown in the figure: The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: JavaScript to achieve slow motion animation effect
>>: Analysis of MySql index usage strategy
Table of contents What are shallow cloning and de...
Website administrators often accidentally delete ...
Preface The mini program has a very convenient AP...
Currently, many businesses are conducting promoti...
Table of contents Preface Arrow Functions Master ...
Table of contents Code: Replenish: Summarize Requ...
This article shares the specific code of vue echa...
1 Introduction Kong is not a simple product. The ...
The content involved in Web front-end development...
A few simple Linux commands let you split and rea...
Solution: Add the following code in <head>: ...
Sometimes we need to import some data from anothe...
Table of contents 1. Global beforeEach 1. Global ...
What is bubbling? There are three stages in DOM e...
Table of contents 1. Recipe Collection 1.1 Projec...