SOUFIANE AMGHAR
SOUFIANE AMGHAR

Reputation: 1

Host.docker.internal on Ubuntu 20.04 and more

I am running this docker compose file for a krakend container and I always get a conn refused error everytime I try to access the gateway on my local machine

2024/05/21 22:22:57 DEBUG: http-server-handler: no extra config [GIN] 2024/05/21 - 22:24:29 | 500 | 118.816115ms | 127.0.0.1 | GET /api/scd/1 Error #01: Get http://host.docker.internal:5000/scd/1: dial tcp 172.17.0.1:5000: connect: connection refused

version: "2.1"

services:

oc-krakend:

container_name: oc-krakend

image: oc-krakend:latest

restart: always

build: ./oc-krakend

ports:

 "8080:8080"

extra_hosts:

  "host.docker.internal:host-gateway"

networks:

oc-network:

driver: bridge

The dev Krakend api :

{ "api": "http://host.docker.internal:5000" }

Any other suggestions since I tried most of the fixes on stackoverflow before and thanks

Upvotes: 0

Views: 93

Answers (0)

Related Questions