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 About FastDFS 1. Search for ima...
Preface Learn MySQL to reorganize previous non-MK...
There are some tags in XHTML that have similar fu...
Table of contents 1. Project folder structure 1. ...
1. What is phantom reading? In a transaction, aft...
In SQL, GROUP BY is used to group data in the res...
Table of contents Preface: accomplish: Summarize:...
Table of contents 1. concat() 2. join() 3. push()...
1. Front-end-led implementation steps The first s...
A design soldier asked: "Can I just do pure ...
Today, I encountered a problem: the content in the...
Table of contents 1 Install Docker 2 Configuring ...
mysql-8.0.19-winx64 downloaded from the official ...
This article uses examples to illustrate how to i...
I usually use nginx as a reverse proxy for tomcat...