I want to create docker volume and add directory and files into it without creating extra container/images or within minimal time. That thing would go into script, so interactions like -it bash
won't do.
I can copy files with:
docker container create --name dummy -v myvolume:/root hello-world
docker cp c:\myfolder\myfile.txt dummy:/root/myfile.txt
docker rm dummy
How do I create an empty dir?:
attempt 1
mkdir lol; docker cp ./lol dummy:/root/lol
# cannot copy directory
docker commit [CONTAINER_ID] temporary_image
docker run --entrypoint=bash -it temporary_image
This thing requires to pull image with bash.