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
When making a web page, we usually need to consid...
When browser vendors bend the standards and take i...
Dimensionality reduction of two-dimensional array...
The growth path from a Linux novice to a Linux ma...
To install VMWare under Linux, you need to downlo...
Prepare the ingredients as shown above (ps: hadoo...
Someone asked me before whether it is possible to...
Here is a single-line layout using ul>li for l...
Table of contents Preface What are dynamic proper...
How can you improve web page performance? Most de...
Result:Implementation Code html <link href=...
Recently, when using Apple.com/Ebay.com/Amazon.co...
Sometimes you need to use links, but you don't...
Table of contents Vue recursive component drag ev...
1. Use basic text elements to mark up content Fir...