I created a Docker container with Apache on it. Everything works, except that I can't link MySQL (https://hub.docker.com/_/mysql/) to my container, and I'm not sure what I did wrong.
Here are the steps I did:
- I run mysql server container
docker run --name mysqlserver -e MYSQL_ROOT_PASSWORD=pass123 -d mysql/mysql-server:latest
- Then, I run and link my Apache Docker:
docker run -it --link mysqlserver:mysql -v "$(pwd)":/var/www/html -p 80:80 -p 3306:3306 apachebash
But I cant access MySQL.