docker: docker compose build calcom fails with "network mode "stack" not supported by buildkit"

Following the instructions to build the container. docker compose build calcom fails with:

WARN[0000] The "NEXT_PUBLIC_TELEMETRY_KEY" variable is not set. Defaulting to a blank string. [+] Building 0.0s (0/0) network mode "stack" not supported by buildkit. You can define a custom network for your builder using the network driver-opt in buildx create.

DOCKER_BUILDKIT=0 docker compose build calcom then fails with:

$ husky install fatal: Not a git repository (or any of the parent directories): .git

Screenshot 2022-05-22 at 13 28 51

Which I assume is related to disabling buildkit.

Ubuntu 20.04.4 LTS

Client: Docker Engine - Community, Version: 20.10.16

docker-compose version 1.25.0, build unknown

Docker Compose version v2.5.0

Any pointers appreciated.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 11
  • Comments: 22 (8 by maintainers)

Commits related to this issue

Most upvoted comments

The error reports that your network named stack hasn’t been created yet. Run docker compose up -d database, which will create the network if it doesn’t exist. Then run your DOCKER_BUILDKIT=0 docker compose build calcom command again.

with DOCKER_BUILDKIT=0 I was able to start the build but for me it crashes at Step 12 with this message: 1 error occurred: * Status: network stack not found, Code: 1

My setup was working until I recently tried to update it (due to hoping that a certain has been ironed out in a newer version).

Now I am stuck at “not supported by buildkit”.

Has anybody succeeded in applying the solution above? I don’t even know where to start…

Decided to give it another try, but getting stuck at the same error again.

Is there now an official solution to this?

Thanks!

For folks landing in this issue, docker-compose is not the only method of building the image. It deserves a written guide, but in the meantime, more advanced users can follow this example to build the container directly, without docker-compose, and by networking directly with a running container.

In our GHA, we stand up the database service and its container, by running docker compose up -d database (specifying database for compose to select and run only our configuration for the database). We don’t have to start the database service using compose, it’s just convenient. Afterwards you can network buildx to the container by specifying container:database as the network. https://github.com/calcom/docker/blob/9f2791858d39343f47d819e9115eb336efa7e973/.github/workflows/docker-build-push-dockerhub.yml#L69-L94