I’ve just learnt Docker for about 4 days and I have a feeling that its common usage is to run containers for a fairly long time (some kind of long-running services).
But I wonder if the following usage is common as well (and can be used without any issue). That is run the containers just like a short-running sandbox. So the time a container lives is just about several seconds (or even shorter). The scenario here is we need to perform some task and this running should be isolated. So instead of running directly in the parent context, I would like to execute the task by running a container.
This time I think the question is not very hard, it just need some experience from who have already used docker for a long time.