[root@docker ~]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
2.检查docker版本
[root@docker ~]# docker -v
Docker version 20.10.18, build b40c2f6
二、创建一个测试httpd容器
1.创建测试目录
[root@docker ~]# mkdir -p /data/test[root@docker ~]# cd /data/test/[root@docker test]#
2.创建httpd容器
docker run -d--name web01 -p82:80 -v /data/test/htdocs/:/usr/local/apache2/htdocs/ httpd
3.查看容器状态
[root@docker test]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
05d35ba971ad httpd "httpd-foreground" About a minute ago Up About a minute 0.0.0.0:82->80/tcp, :::82->80/tcp web01
echo"Docker technology plays an important role in today's society."> index.html
3.查看容器内index.html
[root@docker htdocs]# docker exec -it web01 /bin/bash
root@05d35ba971ad:/usr/local/apache2# ls
bin build cgi-bin conf error htdocs icons include logs modules
root@05d35ba971ad:/usr/local/apache2# cd htdocs/
root@05d35ba971ad:/usr/local/apache2/htdocs# ls
index.html
root@05d35ba971ad:/usr/local/apache2/htdocs# cat index.html
Docker technology plays an important role in today's society.
四、删除测试容器,查看宿主机index.heml
[root@docker htdocs]# docker stop web01
web01
[root@docker htdocs]# docker rm web01
web01
[root@docker htdocs]# ls
index.html
[root@docker htdocs]# cat index.html
Docker technology plays an important role in today's society.
[root@docker htdocs]# docker exec -it web02 /bin/bash
root@f028c9fbcddb:/usr/local/apache2# ls
bin build cgi-bin conf error htdocs icons include logs modules
root@f028c9fbcddb:/usr/local/apache2# cd htdocs/
root@f028c9fbcddb:/usr/local/apache2/htdocs# echo "Docker technology plays an important role in today's society." > index.html
root@f028c9fbcddb:/usr/local/apache2/htdocs#
4.宿主机访问内容
[root@docker htdocs]# curl 127.0.0.1:85
Docker technology plays an important role in today's society.
5.在宿主机默认挂载卷检查index.html
[root@docker htdocs]# docker inspect web02 |grep Mounts -A5"Mounts":[{"Type":"volume",
"Name":"3b1eab4eb072a43375068c8ff534028de2a7f6dd6aeceb60c0d1584c4bc046a6",
"Source":"/var/lib/docker/volumes/3b1eab4eb072a43375068c8ff534028de2a7f6dd6aeceb60c0d1584c4bc046a6/_data",
"Destination":"/usr/local/apache2/htdocs",
[root@docker htdocs]# cd /var/lib/docker/volumes/3b1eab4eb072a43375068c8ff534028de2a7f6dd6aeceb60c0d1584c4bc046a6/_data[root@docker _data]# ls
index.html
[root@docker _data]# cat index.html
Docker technology plays an important role in today's society.
6.删除容器,验证数据持久化
[root@docker _data]# docker stop web02
web02
[root@docker _data]# docker rm web02
web02
[root@docker _data]# ls
index.html
[root@docker _data]# pwd
/var/lib/docker/volumes/3b1eab4eb072a43375068c8ff534028de2a7f6dd6aeceb60c0d1584c4bc046a6/_data
[root@docker _data]# cat index.html
Docker technology plays an important role in today's society.
【论文速递】WACV2022 - 基于小样本分割的多尺度Non-Novel片段消除方法
【论文原文】:Elimination of Non-Novel Segments at Multi-Scale for Few-Shot Segmentation
获取地址:https://openaccess.thecvf.com/content/WACV2023/papers/Kayabasi_Elimi…