Assuming we have a container with name “container1”, is there a way to create a named volume “vol1” that can store the entire container root system / state within in the volume.
By this I mean can we mount the entire container’s filesystem ("/") within a volume?
Simple answer would be “No”, we can’t data volume a base ("/") directory: destination can’t be ‘/’. But I do believe, you can mount individual directory in “/” like /etc, /var ,etc as separate data volumes.
Also may I know the use case, where it is required?