I have an app
which will create a directory storage
inside the docker container and store generated files there. I would like these files & sub-folders (inside the storage directory) to get copied to the host directory test
.
The directory of the container:
# sudo docker exec -it eajcdfufh /bin/bash
root#eajcdfufh:~# ls
storage
root#eajcdfufh:~ cd storage
folder1 file1
To achieve this operation, I have tried to key in volumes params
but unfortunately nothing gets copied to local directory.
docker-compose.yml
version: "3.9"
services:
app:
build:
context: ./
volumes:
- /home/test:/root/storage
ports:
- "8000:8000"
nginx:
restart: always
build:
context: ./nginx
ports:
- "80:80"
depends_on:
- app
May I ask why does nothing gets copied ? And how can I perform such operations?
Thanks, would highly appreciate the help!!!