Snapshot question

Hello

Let’s say I do this:

1, Create a snapshot from a running debian base image (+install apache) and commit it to
testdocker/version1

2, Then I (+install mysql) and commit it to:
testdocker/version2

3, Now if I try to delete version2 with:

docker rmi testdocker/version2

I get:
Conflict, cannot delete c7a70abff108 because the container 0b6cc7178a3f is using it, use -f to force

What is exactly using version2 when the machines are stopped and that is the latest snapshot??? Although if I ignore this warning and use the -f option it will remove version2 without damaging version1. I just want to make sure 100% understanding what’s going on here to avoid further data corruptions.

Also the version1 should not depend on any image, since a base image was pulled in for creating it (therefore it should be a clone of that debian base image). Is this assumption correct?

I did some experiments and regarding how I do it 

1->2->3

1->2
1->3


I can delete any of the snapshots with the (-f) without affecting the other two.

Thanks