Reputation: 1474
If I run docker service rm <service>
, will the <service>'s
volume data be deleted? Documentation on this command does not specify one way or the other.
Upvotes: 1
Views: 992
Reputation: 1474
Tried it out. The answer is no, the volume data will not be deleted.
> docker service create --name test_container --replicas 1 --mount type=volume,source=test_vol,destination=/mnt busybox top
...
verify: Service converged
> docker service rm test_container
test_container
> docker volume ls
DRIVER VOLUME NAME
local test_vol
Upvotes: 3