Is the Docker external host connection command “host.docker.internal:host-gateway” safe?

  Kiến thức lập trình

What I want to do is very popular.

I want to connect to a database on the host from my Docker container.

almost all answers

  1. host.docker.internal (probably for Windows/MAC… Docker desktop only?)

  2. host.docker.internal:host-gateway (probably Linux)

Okay, maybe number 2 is what I need.

However, in the article explaining host.docker.internal, it is said to be “for development use.”

I think that’s probably the same thing with host.docker.internal:host-gateway.

So what should I do?

“Do this in a production environment.” I couldn’t find a clear answer.

LEAVE A COMMENT