Hello @raymond0517 ,
Looks like it’s not an issue with docker.
as per instruction, I can see you did not use --network flag to use a specific network same as your MySQL instance.
please make sure your MySQL instance is up and can be accessible via docker network if you are using both with docker run
You need to create a network with docker network create {network} then create your database container with docker run --name database --network {network} ... ,then run the leantime container with docker run --name leantime --network {network} -e LEAN_DB_HOST=database ....
Of course {network} is just a placeholder for a name you choose yourself. And the docker run commands are incomplete, they just illustrate the relevant parts.
if you don’t specify --network when creating a container, the default bridge network is used, which does not provide built-in dns-based service discovery. User defined networks support service discovery, which allows to reach another container in the same container network by its container name (or in case of a compose deployment, its service name).
If you don’t use docker compose, I strongly suggest using it!