Category Archives: docker

Connect to localhost MySQL from Docker container

To test connection to MySQL/MariaDB server running on localhost from Docker container try: docker run –rm -it –net=host mariadb mysql -u root -h 127.0.0.1 –rm Automatically remove the container when it exits https://docs.docker.com/engine/reference/run/#clean-up-rm -i Keep STDIN open even if not … Continue reading

Posted in docker | Tagged , , | Leave a comment