gpt4 book ai didi

linux - Docker 卷不存储整个数据

转载 作者:太空宇宙 更新时间:2023-11-04 09:59:17 27 4
gpt4 key购买 nike

我在 Docker 中运行 activeMQ 并使用以下命令持久化数据。但是数据并没有完全保存在一个目录中

[root@kubernetes-4 activemq]# docker run -it --rm -v /MyPath:/data webcenter/activemq:5.14.3
2019-08-24 03:56:42,388 CRIT Supervisor running as root (no user in config file)
2019-08-24 03:56:42,388 WARN Included extra file "/etc/supervisor/conf.d/activemq.conf" during parsing
2019-08-24 03:56:42,388 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
2019-08-24 03:56:42,400 INFO RPC interface 'supervisor' initialized
2019-08-24 03:56:42,400 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-08-24 03:56:42,400 INFO supervisord started with pid 1
2019-08-24 03:56:43,403 INFO spawned: 'cron' with pid 16
2019-08-24 03:56:43,405 INFO spawned: 'activemq' with pid 17
2019-08-24 03:56:44,969 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-08-24 03:56:44,969 INFO success: activemq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

我路径中的数据

cd /MyPath/
[root@kubernetes-4 MyPath]# ls
activemq
[root@kubernetes-4 MyPath]# cd activemq/
[root@kubernetes-4 activemq]# ls
[root@kubernetes-4 activemq]#

容器中的数据

root@kubernetes-4 activemq]# docker exec -it 630a3fe743e2 bash
root@630a3fe743e2:/opt/activemq# ls
LICENSE README.txt bin conf.tmp docs lib webapps
NOTICE activemq-all-5.14.3.jar conf data examples tmp webapps-demo
root@630a3fe743e2:/opt/activemq# cd data
root@630a3fe743e2:/opt/activemq/data# ls
activemq.log
root@630a3fe743e2:/opt/activemq/data# cd ..
root@630a3fe743e2:/opt/activemq# cd /data/
root@630a3fe743e2:/data# ls
activemq
root@630a3fe743e2:/data# cd activemq/
root@630a3fe743e2:/data/activemq# ls
activemq.pid kahadb localhost
root@630a3fe743e2:/data/activemq#

最佳答案

安装确切的 activemq direcotry你会看到一切正常。

docker run -dit --rm -v /MyPath:/data/activemq webcenter/activemq:5.14.3

第二,您没有挂载 /opt/activemq/data,因此无法在主机上访问。

出于日志目的,您可以挂载 v/var/log/activemq:/var/log/activemq

关于linux - Docker 卷不存储整个数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57634988/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com