Skip to content

Commit 53db7a8

Browse files
committed
Add host.docker.internal to docker-compose.yml
This should ensure that we can use host.docker.internal to connect to the host machine from within a container irrespective of the OS on the host machine. The host.docker.internal address is automatically available to Docker Desktop[1] on Windows and Mac, but not on Linux without this additional configuration[2]. [1]: https://docs.docker.com/desktop/features/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host [2]: docker/for-linux#264 (comment)
1 parent fe96557 commit 53db7a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docker-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ services:
3737
- POSTGRES_DB
3838
- POSTGRES_PASSWORD
3939
- POSTGRES_USER
40+
extra_hosts:
41+
- "host.docker.internal:host-gateway"
4042
smee:
4143
image: deltaprojects/smee-client
4244
platform: linux/amd64

0 commit comments

Comments
 (0)