I'm relatively new to Docker and I'm trying to set up a cluster with three containers. Everything works fine when I run `docker compose up`, but when I modify my `docker-compose.yml` file to include a build context and then run `docker compose up --build`, I'm experiencing some strange issues with file paths. It seems like the context can't find files that are definitely present. I noticed that if I build the images manually, everything works, but when I use compose, it fails. I'm running Docker on Windows 11, and I suspect there might be an issue with how Windows paths translate to Linux paths. Can anyone help me figure this out?
2 Answers
Just a heads up, when you run the `build` command, Docker expects a Dockerfile named 'Dockerfile' unless you specify a different one using `-f`. Your command with `-f` is working because you're explicitly stating the Dockerfile name, which is good!
I don't have much experience with Docker Desktop but I found this GitHub issue that might relate to your problem: https://github.com/docker/compose/issues/11421. Check if that helps!
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String