Skip to content

Commit

Permalink
use standardized host.docker.internal for docker host
Browse files Browse the repository at this point in the history
Fixes laradock#2966 where current versions of laradock containers are already making DNS requests
to host.docker.internal which resolving NXDOMAIN when it should resolve.

See docker/for-linux#264
    moby/moby#40007
    https://docs.docker.com/engine/release-notes/#networking-2 for
    docker-engine 20.10

Signed-off-by: Beau Hastings <beau@saweet.net>
  • Loading branch information
hastinbe committed May 7, 2021
1 parent 4774281 commit 92f56ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docker-compose.yml
Expand Up @@ -178,7 +178,7 @@ services:
- docker-in-docker:/certs/client
- ./php-worker/supervisord.d:/etc/supervisord.d
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
- "host.docker.internal:${DOCKER_HOST_IP}"
ports:
- "${WORKSPACE_SSH_PORT}:22"
- "${WORKSPACE_BROWSERSYNC_HOST_PORT}:3000"
Expand Down Expand Up @@ -288,7 +288,7 @@ services:
expose:
- "9000"
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
- "host.docker.internal:${DOCKER_HOST_IP}"
environment:
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
- DOCKER_HOST=tcp://docker-in-docker:2376
Expand Down Expand Up @@ -346,7 +346,7 @@ services:
depends_on:
- workspace
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
- "host.docker.internal:${DOCKER_HOST_IP}"
networks:
- backend
### Laravel Horizon ############################################
Expand Down Expand Up @@ -382,7 +382,7 @@ services:
depends_on:
- workspace
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
- "host.docker.internal:${DOCKER_HOST_IP}"
networks:
- backend

Expand Down Expand Up @@ -1346,7 +1346,7 @@ services:
- ${DATA_PATH_HOST}/portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
extra_hosts:
- "dockerhost:${DOCKER_HOST_IP}"
- "host.docker.internal:${DOCKER_HOST_IP}"
ports:
- 9010:9000
networks:
Expand Down

0 comments on commit 92f56ed

Please sign in to comment.