Reputation: 33
I have a existed pure asp.net mvc project.
I follow the official tutorial to put it into a container (https://learn.microsoft.com/en-us/aspnet/mvc/overview/deployment/docker-aspnetmvc#comments-container).
I wonders: how can I update the docker container if I change the code in the project? Do I need to go through the whole process (publish -> build -> start) every time?
Upvotes: 3
Views: 1023
Reputation: 158848
Yes, you need to rebuild the image and start a new container. Don't forget to docker rm
the old container (it will be tied to the old image). Re-running docker build
is intended to be pretty quick, and that should be doubly true with the Dockerfile recommended on that page (that just has a COPY for the built application).
Upvotes: 1