DEV Community

Fomalhaut Weisszwerg
Fomalhaut Weisszwerg

Posted on • Edited on

2

[Docker] How to fix 'host not found in upstream "host.docker.internal"'.

Notice for Japanese: 今回は FLINTERS ブログ祭りの一環で記事を書いています

TL;DR

  1. Update docker to 20.10.0 or later.

  2. Create docker-compose.override.yml

  3. write followings into docker-compose.override.yml

services:
  MY_SERVICE:
    extra_hosts:
      - "host.docker.internal:host-gateway"
Enter fullscreen mode Exit fullscreen mode

It is needed to be replaced MY_SERVICE to your service name.

What is "host.docker.internal" ?

"host.docker.internal" is a magic name of a gateway. It is defined on "Docker Desktop for Mac/Windows" by default but not on the others. So it is possible to use "host.docker.internal" on macOS and Windows by default. But the others require you to define it yourself.

How to define "host.docker.internal"

The docker-compose.yml already in the VCS repository is as following:

services:
  proxy:
    image: nginx
Enter fullscreen mode Exit fullscreen mode

Then your docker-compose.override.yml need to be:

services:
  proxy:
    extra_hosts:
      - "host.docker.internal:host-gateway"
Enter fullscreen mode Exit fullscreen mode

Image of AssemblyAI tool

Transforming Interviews into Publishable Stories with AssemblyAI

Insightview is a modern web application that streamlines the interview workflow for journalists. By leveraging AssemblyAI's LeMUR and Universal-2 technology, it transforms raw interview recordings into structured, actionable content, dramatically reducing the time from recording to publication.

Key Features:
🎥 Audio/video file upload with real-time preview
🗣️ Advanced transcription with speaker identification
⭐ Automatic highlight extraction of key moments
✍️ AI-powered article draft generation
📤 Export interview's subtitles in VTT format

Read full post

Top comments (2)

Collapse
 
redboar1 profile image
Jon

This was helpful, didn't realize that wasn't available on the Linux Docker install out of the box. One correction though, in the yml files, it should be "services:" instead of "service:".

Collapse
 
fmtweisszwerg profile image
Fomalhaut Weisszwerg

Thanks for pointing that out. I've update yml files :-)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay