top | item 46602294

(no title)

gingerlime | 1 month ago

Not sure I understand what you mean. Could you explain?

discuss

order

waynenilsen|1 month ago

say your docker compose file maps postgres to 55555 on your laptop then in the sandbox db url host is host.docker.internal and port is 55555

does that make sense?

gingerlime|1 month ago

Thanks. Yes.

Connecting via an open port between containers isn't a problem though. They all see each other by name anyway (e.g. I can run a pg client to `db` and it will JustWork). The problem is when the coding agent needs to run commands inside the container, or restart the container, inspect logs etc.

If the agent is outside the container, it can run docker (compose) commands and do all that, and it works great. If the agent however is inside the container, it can't. Without mapping the socket that is.