Forum archive
TKL LAMP In Docker Container (win 10 host)
I've been using TKL images in virtualbox for years now. I recently decided to explore running in a docker container instead. I'm very new to docker and container virtualization so please forgive any misunderstandings there!
I tried following the official docs for running in docker to setup a TKL LAMP server: /docs/docker
However, once the container is up and running, I cannot connect to it at all. Docker inspect shows a local IP address as 172.17.0.2 but any attempt to connect to that returns nothing. When I look at the status of the container in docker desktop, none of the expected ports are binding (123XX, 22, 443, and 80).
My host OS is windows 10 and I've tried both the newer WSL2 backend and the older Hyper-V one with the same result. I also see a lot of things in the logs to the tune of "System has not been booted with systemd as init system" and I don't know if that is expected (again, I'm new to docker so maybe this is just part of how this kind of virtualization works).
I'm going to keep exploring things like windows firewall and other docker configuration issues but wanted to go ahead and ask for help here as I think I must be missing something pretty fundamental!
TIA for any help!
I did find that I can expose/bind to local ports with the '-p' option from the command line (something I have messed with before). However, this binds to localhost:port instead of allowing access through the IP of the container itself. It works for now, but I was not expecting to have to do this and it is not quite the model I was hoping for so if there is a way to be able to access the ports directly I would prefer that.