H
H
hail3b2017-02-19 21:22:19
elasticsearch
hail3b, 2017-02-19 21:22:19

How to change container options after docker run?

Understanding Docker using sebp/elk as an example. According to the documentation, I create a container based on the image with the standard run command

$ sudo docker run -p 5601:5601 -p 9200:9200 -p 5044:5044 -it --name elk sebp/elk

where I list the list of ports for transfer.
The question is how to expand the list of ports after creating a container?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Axian Ltd., 2017-02-19
@hail3b

Do you think this configuration command will be enough to make changes?
I would like to change volume settings (such as "-v" arg), but I don't find it.
For make this change, I will create new persistent container, move all volumes to new container, and remove old.
Usage: docker update CONTAINER [CONTAINER...]
Update configuration of one or more containers
--blkio-weight Block IO (relative weight), between 10 and 1000
-c, --cpu-shares CPU shares (relative weight)
-- cpu-period Limit CPU CFS (Completely Fair Scheduler) period
--cpu-quota Limit CPU CFS (Completely Fair Scheduler) quota
--cpuset-cpus CPUs in which to allow execution (0-3, 0,1)
--cpuset- mems MEMs in which to allow execution (0-3, 0.1)
--help Print usage
--kernel-memory Kernel memory limit
-m, --memory Memory limit
--memory-reservation Memory soft limit
--memory-swap Swap limit equal to memory plus swap: '-1' to enable unlimited swap
--restart Restart policy to apply when a container exits
Everything else via restart. The thread is here https://github.com/docker/docker/issues/3285

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question