-
Notifications
You must be signed in to change notification settings - Fork 7
Fix docker compose for macos #3
Fix docker compose for macos #3
Conversation
@krisv can you please check if it works fine on Windows. |
@cristianonicolai traveling this week so at best would only be able to do this next week |
@cristianonicolai I checked this on linux and all it's still working fine. I can try it on windows if it's needed |
#!/bin/sh | ||
|
||
export DOCKER_HOST_IP=$(ip route | grep docker0 | awk '{print $9}') | ||
docker-compose -f ./travel-agency-services.yml rm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristianonicolai just a minor comment here. For me, it's needed remove the old containers to make it work, I'm guessing it could be a good idea add something like ' yes y | docker-compose -f ./travel-agency-services.yml rm'
Tried on macOS, and it doesn't work. The problem is that: On macOS (and Windows), we don't need to set "host.docker.internal" in the "docker-compose" file, as this DNS name is automatically resolved to the Docker host. I've tried running the "docker-compose" file without the "extra_hosts" setting, and then it works fine. So, my recommendation would be to create 2 "docker-compose" files, one for Linux in which we resolve the host-ip and set/map the "host.docker.internal" DNS name to the resolved IP in the "extra_hosts" section, and one for macOS/Windows in which we simply rely on the automation resolution of "host.docker.internal". |
b1d7767
to
50b008c
Compare
@DuncanDoyle @nmirasch ok, another try, now with two separated compose files. |
50b008c
to
cee2624
Compare
@cristianonicolai Works fine now on macOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine now on macOS. Did a full end-to-end run of the demo, including Kafka, ISPN, Prometheus and Grafana.
@nmirasch can you try on Windows too please :) |
@@ -0,0 +1,40 @@ | |||
version: '2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cristianonicolai finally I achieve to try this on windows. To make it run I had to change this version to 2.1 having the same issue than is explained here.
docker/compose#4106 (comment)
It's just a comment, maybe is related with the environment where I'm running, but I just installed the last version of docker-desktop for windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nmirasch thanks, I've updated the version to 2.1.
@DuncanDoyle do you mind checking again if this change doesn't break for you?
cee2624
to
dada815
Compare
No description provided.