[英]docker modify start parameters of exist stopped container
I use sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
command to run a elk container, and has populated many data to the container, but it cannot start now.我使用
sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk
命令来运行一个 elk 容器,并且已经将许多数据填充到容器中,但它现在无法启动.
And I guess it's caused by one service named logstash in the container, so I want to start the container without start the logstash service.而且我猜这是由容器中一个名为logstash的服务引起的,所以我想在不启动logstash服务的情况下启动容器。
There is one parameter -e LOGSTASH_START=0
to make the container not start the service, when create a new container.有一个参数
-e LOGSTASH_START=0
使容器在创建新容器时不启动服务。
How can I apply it to the exist container?如何将其应用于现有容器? I use windows docker-desktop 4.1.1.
我使用 windows docker-desktop 4.1.1。
If you know where the data is kept in the container you can try docker cp elk:/data/path/in/elk/container /target/path/on/host
to move it out.如果您知道数据在容器中的保存位置,您可以尝试
docker cp elk:/data/path/in/elk/container /target/path/on/host
将其移出。
Otherwise you can look here to find the equivalent config.v2.json on Windows;否则,您可以查看此处以在 Windows 上找到等效的 config.v2.json; add the
LOGSTASH_START=0
to the "Env" array ( Note no -e required).将
LOGSTASH_START=0
添加到“Env”数组(注意不需要 -e)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.