louislam / dockge

A fancy, easy-to-use and reactive self-hosted docker compose.yaml stack-oriented manager
https://dockge.kuma.pet
MIT License
13.13k stars 375 forks source link

Unable to use `extra_hosts` #556

Open david-christ opened 4 months ago

david-christ commented 4 months ago

⚠️ Please verify that this bug has NOT been reported before.

🛡️ Security Policy

Description

When using extra_hosts, Dockge fails to bring up my stack. docker compose up -d still works as normal from the command line.

👟 Reproduction steps

Using the following compose.yaml, and then clicking "Start" in Dockge

services:
  myservice:
    image: foo/bar:latest
    container_name: myservice
    environment:
      - TZ=Australia/Sydney
    ports:
      - 1234:1234
    volumes:
      - /docker-data/myservice:/config
    extra_hosts:
      - host=192.168.0.4
    restart: unless-stopped

👀 Expected behavior

It starts as it would without extra_hosts

😓 Actual Behavior

Getting an error

Dockge Version

1.4.2

💻 Operating System and Arch

Debian Bookworm

🌐 Browser

Firefox 127

🐋 Docker Version

Docker 26.1.4

🟩 NodeJS Version

n/a

📝 Relevant log output

Error response from daemon: invalid IP address in add-host: ""