docker run -it --name rabbitmq -p 5671:5671 -v /abc/logs/rabbitmqlogs:/var/log/rabbitmq --restart=always --health-cmd='rabbitmqctl status' --health-interval=3s --network network -e RABBITMQ_LOGS=/var/log/rabbitmq/rabbitmq.log rabbitmq
Error description:
init:do_boot/3
init:start_em/1
rabbit:start_it/1 line 446
rabbit:'-boot/0-fun-0-'/0 line 294
rabbit:start_logger/0 line 924
rabbit_lager:ensure_log_working/0 line 115
rabbit_lager:'-ensure_log_working/0-lc$^0/1-0-'/1 line 115
rabbit_lager:ensure_logfile_exist/1 line 158 throw:{error,{cannot_log_to_file,"/var/log/rabbitmq/rabbitmq.log",enoent}} {"init terminating in do_boot",{error,{cannot_log_to_file,"/var/log/rabbitmq/rabbitmq.log",enoent}}} init terminating in do_boot ({error,{cannot_log_to_file,/var/log/rabbitmq/rabbitmq.log,enoent}})
我想将/var/log/rabbitmq
挂载到主机上的/abc/logs/rabbitmqlogs
位置