Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Problem mounting volumes for log (/dev/log) #2465
Facing problem in mounting the volume for log after upgrading to latest docker for mac version
Following is the Yaml config used in docker-compose file for one of the service.
volumes: - /dev/log:/dev/log
Earlier, we were able to start the containers and mount this volume without any problem. Also, able to see the logs inside the VM with the cmd
Now, when starting the containers
When tried to check the path by connecting to the VM using the cmd
Docker for Mac: version: 17.12.0-ce-mac47 (72b93a017350990850ddc37cd341bd16fce3e911)
Steps to reproduce the behavior
web: image: nginx:latest ports: - "8080:80" volumes: - /dev/log:/dev/log
I just ran into this issue as well. FWIW, it seems there is a busybox variant of syslogd on the system, so I was able to launch the daemon with
Issues go stale after 90d of inactivity.
Prevent issues from auto-closing with an
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
@matt2000 On Docker for Mac, you can't directly mount /var/run/syslog because it isn't in the share list prefs. But if you try to add it to File Sharing, when you attempt restart you are notified that /var/run/syslog "overlaps" with "/private".
This feels like a documentation issue, not software.
There are some different ways to solve logging in general, or work around it. Where it gets awkward is if the user has requirements to respect: for example, they can not modify the code that gets placed into the container, so user is stuck with code that hardcoded /var/log (and this is common, since it's faster than pointing to a network address).
Below is what seems like an ideal solution, except it appears it USED to work and something changed in Docker for Mac (image, perhaps... hazy):