Comment by waynenilsen

1 month ago

You can eject to host.docker.internal it’s the easiest way

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

  • 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?

    • 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.

      1 reply →