March-28th-2019, 08:15 AM
Well, for a quick MySQL test to see if it works in principle I did the following now:
1.) I installed a MySQL client on my Windows machine first to be able to test remote servers.
2.) Then I pulled the MySQL image from the well known company hypriot from here https://hub.docker.com/r/hypriot/rpi-mysql/ (it installs an old verion 5.5 but never mind ... I just wanted to test)
3.) Then I started a container of it. There parameters are network mode "host" not to care about port mapping and the ENV variables MYSQL_ROOT_PASSWORD, MYSQL_DATABASE,MYSQL_USER and MYSQL_PASSWORD beeing set
In the Windows client I created a new connection and entered the netPI ip address instead of 127.0.0.1 ... and guess what it connected to my netPI. So there is no principle problem in letting a MySQL server run in a container.
The best of it now is you can analyse the original Dockerfile on Github of this image at https://github.com/hypriot/rpi-mysql/blo...Dockerfile to see what they have done to build this container. If you take over the line into your Dockerfile build lines you will get managed it to run your own MySQL server at a later version also
1.) I installed a MySQL client on my Windows machine first to be able to test remote servers.
2.) Then I pulled the MySQL image from the well known company hypriot from here https://hub.docker.com/r/hypriot/rpi-mysql/ (it installs an old verion 5.5 but never mind ... I just wanted to test)
3.) Then I started a container of it. There parameters are network mode "host" not to care about port mapping and the ENV variables MYSQL_ROOT_PASSWORD, MYSQL_DATABASE,MYSQL_USER and MYSQL_PASSWORD beeing set
In the Windows client I created a new connection and entered the netPI ip address instead of 127.0.0.1 ... and guess what it connected to my netPI. So there is no principle problem in letting a MySQL server run in a container.
The best of it now is you can analyse the original Dockerfile on Github of this image at https://github.com/hypriot/rpi-mysql/blo...Dockerfile to see what they have done to build this container. If you take over the line into your Dockerfile build lines you will get managed it to run your own MySQL server at a later version also
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)