2
votes

I have a existed pure asp.net mvc project.

I follow the official tutorial to put it into a container (https://docs.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?

1

1 Answers

1
votes

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).