Making your own containers can be a super useful way of not only understanding more about docker, but also for understanding more about the systems administration of your applications or docker images. Maybe you want a specific container for running configured services on your machine, or maybe you want to look at packaging your entire system inside a docker container to make it super easy to run. In this quick post, I am going to dover making a Dockerfile and also what to write in it so that you can start making your own containers, today!
As we have already discussed Docker is a great way to isolate your environment and stop items from crashing into each other. Following on from my last post about running tools from inside a container, we looked at running stuff into your container. Now I am going to have some real life examples.
So far we have been discussing using containers, largely from inside the container. However, sometimes you simply want to use tools from inside your docker container rather than having the dependency nightmare of having everything installed locally (or on your server).
So, you successfully have your containers and you have started to be able to run containers to do stuff. Brilliant. So let us drop into those containers and run something new. You are probably half way there with your understanding, maybe we could say that you have just opened the door on containers, well, you are just about to step in an see how big the room is! Containers give you great, little, isolated machines that you can do with as you please and then throw away.
So, you have successfully installed Docker. Brilliant! Now, what?! Well, the obvious thing to do is to go about running some containers. The Docker documentation suggests that you should pull and run the Hello World container, and although it is small, there are much better things we can do straight away to start to show the power of Docker.