Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker compose up is broken on macOS #1739

Closed
trentm opened this issue Oct 9, 2024 · 19 comments
Closed

docker compose up is broken on macOS #1739

trentm opened this issue Oct 9, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@trentm
Copy link

trentm commented Oct 9, 2024

Bug Report

Which version of the demo you are using?
commit 6d074fb

Symptom

The recent change in #1728 breaks docker compose up on macOS:

% docker compose up -d
[+] Running 7/8
 ✔ Container jaeger       Running                                              0.0s
 ✔ Container kafka        Running                                              0.0s
 ✔ Container grafana      Running                                              0.0s
 ✔ Container valkey-cart  Running                                              0.0s
 ✔ Container opensearch   Healthy                                              3.5s
 ✔ Container flagd        Running                                              0.0s
 ✔ Container prometheus   Running                                              0.0s
 ⠋ Container otel-col     Starting                                             0.1s
Error response from daemon: path / is mounted on / but it is not a shared or slave mount

When I apply the following change, I am able to bring the services up:

diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml
index 585bed0..07b1173 100644
--- a/docker-compose.minimal.yml
+++ b/docker-compose.minimal.yml
@@ -585,7 +585,7 @@ services:
     command: ["--config", "/etc/otelcol-config.yml", "--config", "/etc/otelcol-config-extras.yml" ]
     user: 0:0
     volumes:
-      - ${HOST_FILESYSTEM}:/hostfs:ro,rslave
+      - ${HOST_FILESYSTEM}:/hostfs:ro
       - ${DOCKER_SOCK}:/var/run/docker.sock:ro
       - ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
       - ${OTEL_COLLECTOR_CONFIG_EXTRAS}:/etc/otelcol-config-extras.yml
diff --git a/docker-compose.yml b/docker-compose.yml
index 014c2b4..990e36f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -696,7 +696,7 @@ services:
     command: ["--config", "/etc/otelcol-config.yml", "--config", "/etc/otelcol-config-extras.yml" ]
     user: 0:0
     volumes:
-      - ${HOST_FILESYSTEM}:/hostfs:ro,rslave
+      - ${HOST_FILESYSTEM}:/hostfs:ro
       - ${DOCKER_SOCK}:/var/run/docker.sock:ro
       - ${OTEL_COLLECTOR_CONFIG}:/etc/otelcol-config.yml
       - ${OTEL_COLLECTOR_CONFIG_EXTRAS}:/etc/otelcol-config-extras.yml

Additional Context

Myself and another co-worker are hitting this. We are both on macOS/arm.

% uname -v
Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:04 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6030
@trentm trentm added the bug Something isn't working label Oct 9, 2024
@JessicaGarson
Copy link

JessicaGarson commented Oct 9, 2024

I also had the same experience here as well but with make start:

Darwin Kernel Version 23.6.0: Wed Jul 31 20:48:52 PDT 2024; root:xnu-10063.141.1.700.5~1/RELEASE_ARM64_T6020

I was able to get the demo running by checking out older commits from this repo such as:

git checkout b77c589be4868284064bb96b460d82ed63a1106e

@rogercoll
Copy link
Contributor

@trentm @JessicaGarson Could you share the Docker version you had the issue with?

If you upgrade Docker 27.2.1+, does the issue persist?

This issue was reported for the latest Docker versions: docker/compose#12139

@JessicaGarson
Copy link

JessicaGarson commented Oct 10, 2024

I was using Docker Desktop 4.34.3. I had an earlier version and tried upgrading it as part of the troubleshooting process.

Screenshot 2024-10-10 at 8 31 54 AM
Docker version 27.2.0, build 3ab4256

@trentm
Copy link
Author

trentm commented Oct 10, 2024

^^ Same for me: Docker Desktop 4.34.3 (170107) is currently the newest version available.
which on the CLI corresponds to docker 27.2.0:

% docker version
Client:
 Version:           27.2.0
 API version:       1.47
 Go version:        go1.21.13
 Git commit:        3ab4256
 Built:             Tue Aug 27 14:14:45 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.34.3 (170107)
 Engine:
  Version:          27.2.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.21.13
  Git commit:       3ab5c7d
  Built:            Tue Aug 27 14:15:41 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.20
  GitCommit:        8fc6bcff51318944179630522a095cc9dbf9f353
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Assuming I have this right and that /usr/local/bin/docker was actually installed by Docker Desktop.

I notice that brew has a newer version of Docker available:

% brew info docker
==> docker: stable 27.3.1 (bottled), HEAD
Pack, ship and run any application as a lightweight container
https://www.docker.com/
Not installed

@trentm
Copy link
Author

trentm commented Oct 10, 2024

I guess Docker Desktop releases lag on the docker engine version included.
Docker Desktop v4.34.0 release notes mention updating Docker Engine to v27.2.0: https://docs.docker.com/desktop/release-notes/#4340

@trentm
Copy link
Author

trentm commented Oct 10, 2024

That docker compose fix (* 9c60fe67d - (tag: v2.29.7) revert commits link to mount API over bind changes (3 weeks ago)) was tagged v2.29.7

% docker compose version
Docker Compose version v2.29.2-desktop.2

So perhaps we need to wait for Docker Desktop to get a release with v2.29.7 out?

@julianocosta89
Copy link
Member

This is interesting.

I'm in a super outdated version on Mac and I don't have this issue.

My current version is: 4.26.1 (131620).

@zzzk1
Copy link

zzzk1 commented Oct 11, 2024

I am experiencing this issues too, Docker Desktop 4.34.3 (170107)

@mviitane
Copy link
Member

I'm running 4.28.0 (139021) and this old version is running fine.

$ docker version
Client:
 Cloud integration: v1.0.35+desktop.11
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:13:26 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.28.0 (139021)
 Engine:
  Version:          25.0.3
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       f417435
  Built:            Tue Feb  6 21:14:22 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

@trentm
Copy link
Author

trentm commented Oct 15, 2024

I'm in a super outdated version on Mac and I don't have this issue.

yah, the issue was caused by a compasses change that was then reverted. So there is a range of versions of docker compose where this is broken.

@julianocosta89
Copy link
Member

@trentm is there anything we can do on our end?
Or should we close this issue?

@trentm
Copy link
Author

trentm commented Oct 15, 2024

I guess that is up to the maintainers of this repo. Personally I'd keep it open until the issue is fixed... which I think is personal until Docker releases a Docker Desktop for macOS that includes the updated docker compose. I don't know what the process is for updating compose in Docker Desktop.

@puckpuck
Copy link
Contributor

Docker Desktop 4.35.0 with Docker Compose 2.29.7 was just released. Unfortunately, I don't have permission to update Docker Desktop on my system (need to wait on IT). If someone on Apple silicon can update their Docker Desktop and test to confirm that would be appreciated.

@aurumae
Copy link

aurumae commented Oct 27, 2024

@puckpuck Still getting the same issue here

% docker version
Client:
 Version:           27.3.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        ce12230
 Built:             Fri Sep 20 11:38:18 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.35.0 (172550)
 Engine:
  Version:          27.3.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.7
  Git commit:       41ca978
  Built:            Fri Sep 20 11:41:19 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.21
  GitCommit:        472731909fa34bd7bc9c087e4c27943f9835f111
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

% docker compose version
Docker Compose version v2.29.7-desktop.1

% docker compose up --force-recreate --remove-orphans --detach

[+] Running 24/25
 ✔ Container frontend-proxy           Recreated                                              0.9s
 ✔ Container accounting-service       Recreated                                              0.8s
 ⠹ Container otel-col                 Starting                                              11.8s
 ✔ Container cart-service             Recreated                                              0.6s
 ✔ Container ad-service               Recreated                                              0.7s
 ✔ Container prometheus               Started                                                1.2s
 ✔ Container valkey-cart              Started                                                1.2s
 ✔ Container opensearch               Healthy                                               11.7s
 ✔ Container grafana                  Started                                                1.2s
 ✔ Container checkout-service         Recreated                                              0.8s
 ✔ Container jaeger                   Started                                                1.2s
 ✔ Container frauddetection-service   Recreated                                              0.8s
 ✔ Container kafka                    Started                                                1.2s
 ✔ Container flagd-ui                 Recreated                                              0.7s
 ✔ Container frontend                 Recreated                                              0.8s
 ✔ Container load-generator           Recreated                                              0.9s
 ✔ Container payment-service          Recreated                                              0.7s
 ✔ Container product-catalog-service  Recreated                                              0.7s
 ✔ Container recommendation-service   Recreated                                              0.7s
 ✔ Container flagd                    Started                                                1.2s
 ✔ Container currency-service         Recreated                                              0.2s
 ✔ Container email-service            Recreated                                              0.2s
 ✔ Container imageprovider            Recreated                                              0.2s
 ✔ Container quote-service            Recreated                                              0.2s
 ✔ Container shipping-service         Recreated                                              0.2s
Error response from daemon: path / is mounted on / but it is not a shared or slave mount

@johnmartin
Copy link

@puckpuck Can confirm I am still getting same issue too:

❯ docker version
Client:
 Version:           27.3.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        ce12230
 Built:             Fri Sep 20 11:38:18 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.35.0 (172550)
 Engine:
  Version:          27.3.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.7
  Git commit:       41ca978
  Built:            Fri Sep 20 11:41:19 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.21
  GitCommit:        472731909fa34bd7bc9c087e4c27943f9835f111
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
❯ docker compose version
Docker Compose version v2.29.7-desktop.1
❯ docker compose up --force-recreate --remove-orphans --detach
[+] Running 24/25
 ✔ Container accounting-service       Recreated                                        1.0s
 ✔ Container frontend-proxy           Recreated                                        1.1s
 ✔ Container cart-service             Recreated                                        0.7s
 ✔ Container ad-service               Recreated                                        0.7s
 ⠙ Container otel-col                 Starting                                        12.0s
 ✔ Container prometheus               Started                                          1.4s
 ✔ Container checkout-service         Recreated                                        1.0s
 ✔ Container opensearch               Healthy                                         11.9s
 ✔ Container grafana                  Started                                          1.3s
 ✔ Container valkey-cart              Started                                          1.4s
 ✔ Container frauddetection-service   Recreated                                        1.0s
 ✔ Container jaeger                   Started                                          1.3s
 ✔ Container flagd-ui                 Recreated                                        0.7s
 ✔ Container kafka                    Started                                          1.4s
 ✔ Container frontend                 Recreated                                        1.0s
 ✔ Container load-generator           Recreated                                        1.1s
 ✔ Container payment-service          Recreated                                        0.7s
 ✔ Container product-catalog-service  Recreated                                        0.7s
 ✔ Container recommendation-service   Recreated                                        0.7s
 ✔ Container flagd                    Started                                          1.4s
 ✔ Container currency-service         Recreated                                        0.2s
 ✔ Container email-service            Recreated                                        0.2s
 ✔ Container imageprovider            Recreated                                        0.2s
 ✔ Container quote-service            Recreated                                        0.2s
 ✔ Container shipping-service         Recreated                                        0.2s
Error response from daemon: path / is mounted on / but it is not a shared or slave mount

@trentm
Copy link
Author

trentm commented Oct 28, 2024

@rogercoll I wonder if the answer (at least when using docker compose of at least version v2.29.7) is to revert #1728, or at least revisit if the ,rslave addition in that PR is currently still necessary. My (pretty naive) understanding is that docker/compose#12141 may have made that ,rlsave addition no longer necessary for usage on Docker Desktop for Windows.

@rogercoll
Copy link
Contributor

@rogercoll I wonder if the answer (at least when using docker compose of at least version v2.29.7) is to revert #1728

I agree, have just tested latest docker compose version on Linux and the extra mount annotations are not needed anymore:

$ docker compose version
Docker Compose version 2.29.7

@rogercoll
Copy link
Contributor

Many thanks to everyone that helped troubleshooting the issue, reverting changes in #1755

@julianocosta89
Copy link
Member

Issue should be fixed in latest main.
Please let us know if it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants