Dependency hell is something that the application developers are dealing with for a very long time and what it means is, i build my application on my development machine, it works great, then i deploy my application to the production environment but it doesn’t work.
Hey developer, your application doesn’t work in our environment, fix it. Hey sysadmin, it works fine in my environment, why doesn’t it work in your environment? Therefore, it leaves system admin and developers pointing fingers at each other. Here, the concept of docker containers came into picture.
Containers are completely isolated environment.The application only needs to run inside the container which means that the operating system,underlying host and the environment that it runs on is completely abstracted from the application and therefore it successfully solves the problem of dependencies.
So if you are also dealing with such kind of problems within your content management system, this blog will definitely help you out. Here, we are taking joomla as a CMS which enables you to build websites and powerful online applications. Here we go !!
Understanding the scenario :
When using docker, we start with a base image. We boot it up, do changes and the changes are saved in layers forming another image. Basically, there are following two ways to create an image :-
Interactively, by running a shell from a base image and manually installing the required software.
Imperatively, by defining a series of commands inside a Dockerfile.
The first approach is undoubtedly better when experimenting or finding your feet, but when you want to start building reliable, reusable images I’ve found using a Dockerfile a must. So, we will go ahead with the latter one.
An instance of an image is called container. You have an image, which is a set of layers as you have described it by yourself. If you start this image, you have a running container of this image. You can have many running containers of the same image. To see all of your images and containers, run the following commands :-