简体   繁体   中英

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.

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.

There is one parameter -e LOGSTASH_START=0 to make the container not start the service, when create a new container.

How can I apply it to the exist container? I use 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.

Otherwise you can look here to find the equivalent config.v2.json on Windows; add the LOGSTASH_START=0 to the "Env" array ( Note no -e required).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM