I have only the Docker image file. I don't have docker-compose.yml file. I want to test it my local database with the Docker image. I tried to run the docker image with localhost database. But not able to connect my xampp Mysql
docker run -d -t -i -e MYSQL_DATABASE='database' -e MYSQL_HOSTNAME='localhost' -e MYSQL_PORT='3306' -e MYSQL_USER='root' -e MYSQL_PASSWORD='example' -p 8081:80 <DOCKERIMGID>
I tried 192.168.0.1 & 127.0.0.1, localhost, host.docker.internal
But, it's not working.