I know that in docker we can run data volume containers like this
#create a pure data container based on my data_image
docker run -v /data --name data-volume-container data-vol-container-img
# here I'm using the data volume in a property container (ubuntu)
docker run --volumes-from data-volume-container ubuntu
my question is how do we create the data_image?
I know that the easiest way is to create a image based on ubuntu, or anything like that
From ubuntu
Copy data /data
CMD["true"]
But the thing is , why do I need ubuntu as my base image??? (I know it's not a big deal as ubuntu is going to re-used in other scenarios). I really want to know why can't I use scratch??
FROM scratch
COPY data /data
#I don't know what to put here
CMD ["???"]
The image i'm creating here is meant to be a dummy one, it execute absolutely NOTHING and only act a dummy data container, i.e to be used on in docker run -v /data --name my_dummy_data_container my_dummy_data_image
Any ideas??
(Is it because scratch doesn't implement a bare minimum file system? But Docker can use the host system's file system if a container doesn't implement its own)