Having Issues with Docker Compose on Windows 11

0
0
Asked By NinjaCat543 On

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

Answered By DockerMaster99 On

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!

Answered By DockerDude42 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.