When scaling down Docker Swarm services using docker service scale <service_name>=<n-1>
, it seems the to-be-scaled-down container is not only exited but completely removed, including the logs.
The same happens when using docker service update --replicas <n-1> <service_name>
How can I change this behavior to keep the container in exited state, list-able with docker ps -a
and to be able to still access the log file with docker logs <container>
?