Snapshot

If you create a container from an image and want to keep the file changes as an image for further containers, you can write the container as a snapshot, which makes a new image.

Volume

If you want to persist file changes such as in a user directory or database storage even after deleting a container, then set up a volume.