Here are the docker layers I want to implement: https://stackoverflow.com/questions/31222377/what-are-docker-image-layers
I want to mount a folder from host to docker with:
docker run \
-v /path/to/host/large_size_folder:/var/large_size_folder \
my_docker \
/bin/bash -c "rm -rf /var/large_size_folder/file1 && echo "hello" > /var/large_size_folder/file2"
Because the size of /path/to/host/large_size_folder is very large that I don't want to copy it to the docker image. So I use -v to mount it to the docker image.
And then, I run the docker and use bash to add/modify/delete files inside the "/var/large_size_folder".
But this action will also add/modify/delete files from host.
Is it possible to make any modification in the docker layer only without affecting the host directory when running /bin/bash -c "rm -rf /var/large_size_folder/file1 && echo "hello" > /var/large_size_folder/file2" inside the docker container?