Docker compose build runs with no output with no result

Hi everyone,

I am trying to build the first image with docker compose on FRESH setup.
I can’t see any details / information.

image

I tried docker compose and docker-compose.
And absolutely nothing happens. No image is created, no prompt information about build, completely nothing.

On the other hand, docker build works perfect.

What kind of logs might be helpful? Where to find them? I really don’t know where to start.

Also, maybe I missed something but I didn’t find any information. I will be happy for any help.

$ docker compose version
Docker Compose version v2.27.1-desktop.1
$ docker version
Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:29:54 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.31.1 (153621)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:22 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

MAybe there is nothing to build. Are you sure you want to build an image and not run containers? That would be a different command. And if you have nothing to build, compose will not do anything, therefore it will not show anything in the output (maybe it should). If you want to run containers, this is the command you need

docker compose --env-file .env.file up -d 

If this is not what you need, share your compose file.

Hey, I had the same issue. Make sure that a Dockerfile exists in the directory where you run this. Or better yet make sure you have a “build:” section in your docker-compose file. This should specify the location of the dockerfile, like so:

    build:
      context: .
      dockerfile: ./docker/Dockerfile

I have the same problem, the build does not launch without response, no log nothing. I’m using wsl docker dekstop and nothing’s happening. I’m using the latest version v4.33.1, a tool that provides no log, Where should you look? The DockerFile, the docker-compose, the docker Desktop, I’ve deleted reinstall, up down, build specif build, no-cache, etc., etc., etc… I’ve got zero information, I’ve never seen such crap!

Please, share the commands and a Dockerfile and compose file that can reproduce the issue. As you can see in the previous post, we only experience this when there is nothing to build.
When you share these files and commands, format your post using code blocks as described hre

I’ve been using docker on Linux with the same project for several months and have never noticed any problems. But this week I wanted to test the same project on Windows with docker dekstop and wsl2, I mounted a symbolic link of my project, and I also have directories that I mount. My dockerfile and docker.compose are relatively complex. I think docker can’t detect the changes because it doesn’t understand the difference between the symbolic link c/mnt/project, c:/project, and /project…in short, it doesn’t work and it doesn’t say anything.It’s crazy that we don’t have a log somewhere that tells us, this directory doesn’t have any changes…

Again, you can tell us how bad Docker Desktop is, but we can only help if you help us with a file you tested and know it didn’t work. If I see the same issue, I know what I have to solve or report, but even if you say you exprience the issue with all your projects, it doesn’t mean I will be able to reproduce it. If your project is complex, you can make a smaller one that has the same or similar result. That we can try quickly without spending hours on discussions to understand what and how you did.

I can imagine problems with symlinks but based on your description I could not make an example project myself. A symlink is a pointer on Linux to another file, but but I don’t remember how it is stored on Windows so you could mount it. In any case, you should have some output somewhere and maybe you have just couldn’t find. It is entierely possible that we completely misunderstand your issue and it is different from the other problems discussed in this topic.

You could also enable WSL integration and work from the WSL distribution on Linux. That would mean your files would be on Linux and symlinks would be compatible with the client side and the container.

So in short, if you can provide some code we can try, we can help.

Thanks rimekek, you Can reproduce the problem with this steps : Docker Desktop, go to Settings >> Resources >> WSL Integration Ubuntu
C:/project
Go terminal
WSL

sudo mkdir /project
sudo mount --bind /mnt/c/project /project
ls /project
git clone https://github.com/cvat-ai/cvat
cd cvat
docker compose up -d
sudo docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser'
docker compose -f docker-compose.yml down

Change/update/add file in the backend, exemple in the folder cvat_ui

docker compose -f docker-compose.yml build

No build, nothing, any changement detected…

And what do you expect to build and why? Please, quote the part from the compose file or anywhere that indicates it should build docker images. As I see, there is no build definition in the compose file at all. So as I wrote

Did you see a tutorial somewhere that asked you to run the build command? If you did, are you sure that it referred to the same compose file you tried?

Because i Can try to simplify :slight_smile:

docker compose -f docker-compose.yml -f docker-compose.dev.yml build This last file contains the build on the example directory

Okay, I can try that too later.

1 Like

I tried it and I got the output on Windows. In fact, it started more than 13 minutes ago and still running. What do you see when you run this command?

docker compose -f docker-compose.yml -f docker-compose.dev.yml config

Thanks Rimelek, I did indeed relaunch this morning and this time it built :+1: