I have this docker-compose:
version: "3.9"
services:
myserver:
image: <some image>
restart: always
volumes:
- ./res:/tmp/configs
- ./myfolder:/tmp/logs
Should I expect to see the files that are in /tmp/logs inside the container, in the host folder ‘myfolder’?
‘myfolder’ is empty and I want it to be updated with the contents of the /tmp/logs folder in the container.
2
Answers
What worked for me is using full path for the host path.
C:myfolder
for example.For formatting purposes, I post this as an answer instead of comment.
Can you put following in
test.sh
on the host?and run
bash test.sh
on the host and see if it works. host dir is/tmp/docker-compose/myfolder
.