-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Ability to make container configuration changes on (running) containers #3285
Comments
Related to #2733. What we probably need is an "update" command that takes similar options to "run" along with a container ID/name. |
For those needing a quick fix for port mapping/binding: http://stackoverflow.com/questions/19897743/exposing-a-port-on-a-live-docker-container |
iptables can't work. |
+1(!) |
+1 |
+100 |
+1 |
Even changing ports binding without need to create intermediate image and start new container would be great. |
+1 I want to change a container's base image. And keep all other settings. |
@jinchizhong changing the base-image of a (running) container is not possible (even if this proposal is implemented). This proposal is only for changing a limited number of settings of a running container (for example, rename the container, expose/publish ports, add a link to a container) |
@thaJeztah Would also like to have a flag while commit to copy settings of running container and bake it to image |
+1 |
+1 |
I think it's safe to stop with the +1s. I too find myself wanting this almost daily, but am some how able to divine the strength and serenity to not pollute the internet with yet another +1. There's no doubt it's a desired and useful feature. If you're not contributing to the conversation, please keep it to yourself. |
@IanWizard totally agree, the Subscribe button is right there for this specific reason. |
Thank you @IanWizard Was getting a little frustrated with all the email (he says, triggering another one) |
I will slap the next person to +1 this... |
+1.... |
container renaming would be nice |
@isanych container renaming was introduced in docker 1.5 |
@cpuguy83, thanks, will ask to upgrade docker on server |
+1!! |
+1 |
Even the political threads don't hurt this much. On 07/29/2015 11:24 AM, Charles Ferreira Gonçalves wrote:
|
I agree with @bradleypeabody .... The requirement of 'running' could be removed if this would make the implementation easier. Would not be a great deal to stop the container. |
Hello! |
There is an implementation here: #15078 |
👍 |
USER POLL The best way to get notified when there are changes in this discussion is by clicking the Subscribe button in the top right. The people listed below have appreciated your meaningfull discussion with a random +1: @lamersons |
+1 |
@omerh see I believe we should close this generic issue since ping @thaJeztah Do you agree? |
I agree, each property that's added to |
+1 |
+1 |
+1 Usage: docker update CONTAINER [CONTAINER...] Update configuration of one or more containers --blkio-weight Block IO (relative weight), between 10 and 1000 Addressed for @cpuguy83 also for all Docker contributors. I think you fix this. Thanks :) |
@yanislavb no w.r.t |
Can I modify container configuration file? |
The container configuration file is in If your container itself does not contain any stateful data, replacing a container is really the way to go (instead of updating the existing one). |
On my way, that's not really |
Hi there, I am curious if we can support |
I am going to lock the conversation on this issue, to repeat my earlier comment #3285 (comment); A Also note that docker services (in swarm mode) allow you to update service definitions, but mechanics are slightly different, because updating a service recreates containers. |
I'd like to be able to make configuration changes to a container (running or stopped). Specifically, any setting that can be set when starting a container with
docker run
should be able to be changed after-the-fact easily.Rationale:
When working with containers, it's inevitable that at one point you find yourself in a situation where you've spent an hour fiddling with a running container so that you can start using it (e.g. setting up a job system in a Jenkins container), only to realize that you forgot to make a certain configuration change way back when you ran the container using
docker run
. This tends to happen a lot with badly-documented images on the Index; if the image documentation doesn't tell me that I need to expose port 443 on my host system, I'm probably going to forget that.In such cases, it would be great if I could make container configuration changes whilst the container is running, or after I've stopped the container manually.
Unfortunately, docker doesn't currently seem to support this. Since you can't re-run a stopped container with
docker run
, you would need to commit the container to an image and then re-run it.Unfortunately,
docker commit
clears the container's configuration, so you need to explicitly set a startup configuration using the -run commandline argument, unless you don't mind manually specifying the entrypoint/cmd et cetera each time you run this new image withdocker run
(which I don't think is very user friendly). As a workaround, you can inspect the container, copy the Config, and paste the config into the -run parameter ofdocker commit
, but this isn't really user-friendly either.The text was updated successfully, but these errors were encountered: