docker-compose up gives errors: Are you trying to mount a directory onto a file?

Since you are on a Windows host, the mount paths like /etc/localtime won’t work because they don’t exist on your system. The configuration you are using is for a Linux-based host.

Although, it’s recommended, you can remove those mounts from your services. But, keep in mind that you need to keep the docker socket mount, and you will need to adjust it for a Windows host (since the one you have is also for a Linux host). You can try some solution from here.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top