You have to get your hands dirty!

This applies to everything not just Docker. So I do a “docker ps -a” and run a container I see…expecting something to happen. The container is Hello-World…nothing happens. Well actually something did happen. It spit out some messages. Stuff about PHP. I saw a docker build and I found the Dockerfile with the FROM FROM php:7.0-apache command. Now I’m aware that PHP can run without a browser. But even though I have a bad memory I still knew I never used it that way. In learning I had also ran a bash script that printed Hello World which obviously doesn’t need a browser. I seem to remember doing a docker thing recently in a browser. So I fire up Firefox and type localhost in the address bar…still nothing but errors. I think I’ll look at the Linux history file for a clue. And there it was…of course the -p switch to expose port 80. I immediately knew that was the problem after seeing it. I didn’t learn a new docker command. I knew and understood the command. I just had to use the command I already knew. Due to mostly reading and watching videos I’m not “thinking” in Docker! So as soon as I saw a php or apache message, that is a big clue, I should know I’ll need the -p switch to expose the port to my local browser. You…or at least I, must get hands on experience and make mistakes in order to start thinking in Docker or Go or….whatever!