New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement docker update command #15078
Conversation
So, my take on this new command is that it doesn't really address any of the issues described there, per-se:
All those issues will still be present if we add this new command, but people will have to learn how to use From my point of view, the main pain points are caused by bad usability in other commands. I'd personally prefer to have concrete solutions to those issues before adding a new command, but I can be convinced that we need a new command if there is no other way to solve those issues. |
I have a weak +1 for dynamically changing resource configs on both running and stopped containers, however I am not exactly sure if we would want (or even able to) change other settings (e.g. environment variables). Therefore, I don't know if |
We don't need to commit the container to an image and re-run it, we just do:
As above, this is not the common use case, for people who want to dynamically change properties, they don't want to delete or commit current container and re-run it. |
@tiborvass I'm open with the command name 😄 |
@hqhq I am trying to understand your related previous PR here: #11442 and the feedback received. Do you agree with the suggestion that using --cgroup-parent enables us to change resource configs of a running container? I don't yet see how this could be done. Since only docker run accepts the --cgroup-parent flag, the only way I can actually change the config. of a container that is already started is to directly write to the cgroup filesystem on the docker host. Would you have an example of how --cgroup-parent can be used to change config of a running container? I have asked the same question in that PR too, but wasn't sure if a closed PR intimates those involved. Thanks for any hints! |
but if we allow to run stopped containers with |
@selvik You can always change resource configs of running containers by changing their cgroup files, that has nothing to do with Docker, but usually the problem is it relayed on users understand cgroup details, know the cgroup path of their containers, and know which files to be changed, So I didn't mean |
@calavera Sort of. But it only resolve the problem that change configs for stopped containers, not for running containers, and I think that'll make it more complicated, because not all options of |
@hqhq I agree, we're on the same page then. docker set would be very useful for us. Looking forward to this PR being merged! Thanks for working on it! |
Is it mean that I have to I need to change limits on If I can help you to implement changing |
@cnaize No you don't need to stop container, you can just use My approach support changing configs for both running and stopped containers. You don't need to know if a container is running or stopped, for stopped container, the changed configs will be effective when it started again. Currently, the |
How are we on that ?
@hqhq needs a rebase 😓 |
Collective review There are valid usecases detailed below. The For the sake of the discussion, we added more questions to explore different solutions for the usecases. Some valid usecases:
One solution would be to add a new |
Forgot to mention environment variables: I'm not even sure how you can do that without restarting the process at which point you might as well respawn the container. |
yup - some config changes may not take effect until there's a restart of the container, but I can see that for some scenarios that's better than having to start from scratch with a new container. |
Yes |
Where should I address request to implement |
Hi,我现在希望在container running的情况下去修改容器的端口映射,我看到docker set可以实现CPU和MEM的动态修改,但是如何去动态修改他的端口映射,你有什么建议吗,谢谢 |
@hqhq Thanks !! 👏 LGTM again and again 😉 |
docs LGTM! I think we're there, and it's ready to merge! 👯 Thank you so much @hqhq, very happy to see this ready. Thanks for being so patient with us! I restarted the Windows CI for good measure, because it timed out |
sigh, flaky tests I think;
and
Second run:
|
Implement docker update command
@hqhq Thank you for the work. |
@moxiegirl I noticed some tiny nits in the docs, but will create a follow up PR to address those. I didn't think it was worth blocking the merge on those :) |
@thaJeztah Thanks. You notice I had not actually done an LGTM on this one...it was in a hurry I believe to I won't complain but I will point out. :-P |
For operations on multi containers, we printed error for each failed container, then printed an extra message for container names, it seems redundant. Addresses comments: moby#15078 (comment) Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
For operations on multi containers, we printed error for each failed container, then printed an extra message for container names, it seems redundant. Addresses comments: moby#15078 (comment) Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Hey, |
For operations on multi containers, we printed error for each failed container, then printed an extra message for container names, it seems redundant. Addresses comments: moby#15078 (comment) Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
fixes #6323
It's used for change properties of one or more containers, we only
support resource configs for now. It can be extended in the future.
Signed-off-by: Qiang Huang h.huangqiang@huawei.com
The original PR #11442, compared to the former one, changelog:
We have strong needs for this feature for a long time, see #3285. It's really useful feature and necessary for most product usage.
@icecrime @crosbymichael as we discussed on DockerCon, we should reconsider this feature, I have pinged you guys several times hope we can reopen the original one but got no reply, so I opened this new PR, hope it's ok. If the old one can be reopened, I'm ok to close this and continue the original discussion.