I think your sequence works because your initial container was launched with a /bin/bash which is interactive by default.
When a container launch a task that is supposed to stop and therefore, not being interactive, then your way of doing things won’t work : You will arrive in a middle of a process (my exemple, a build) and if you stop it to do another task, the container will stop. End of story.
1 Like