You would bring up a 2nd container with the new code, map the traffic to this container, and once you are sure it is good, trash the old container.
If there is a problem with the new code, just point the traffic back to the working container and kill the new container.