What I want to do
- Set up a backend server inside a Docker for Mac container.
- Access MySQL from that server, which is running on a host.
Things you can't do
- Connect to MySQL from Docker for Mac.
Things I've tried
- Started a container using
host.docker.internal
as follows.
docker run --rm -it --add-host=host.docker.internal:host-gateway ubuntu:22.04 sh start.sh
The url for sending a request to MySQL is as follows
app@tcp(127.0.0.1:3306)/app_name?parseTime=true&charset=utf8mb4
```