Assume that i have an application with this simple Dockerfile:
//...
RUN configure.sh --logmyfiles /var/lib/myapp
ENTRYPOINT [\"starter.sh\"]
CMD [\"run\"]
EXPOS
So how can i mount the /var/lib/myapp from the container to the /var/lib/myapp in host server
That is the opposite: you can mount an host folder to your container on docker run.
(without removing current container)
I don't think so.
Right now, you can check docker inspect /var/lib/docker/volumes/...
associated to the volume from your container.
Or you can redirect the result of docker logs
For more example, see this gist.
The alternative would be to mount a host directory as the log folder and then access the log files directly on the host.
me@host~$ docker run -d -p 80:80 -v :/etc/nginx/sites-enabled -v :/etc/nginx/certs -v :/var/log/nginx dockerfile/nginx
me@host~$ ls
(again, that apply to a container that you start, not an existing running one)