Containerizing applications
A dockerized application is a basic deployable unit that can be integrated later as part of your whole ecosystem of applications. When you're dockerizing your application, you'll have to create your own Dockerfile with all the required instructions to make your application work.
As we mentioned in the last section, we can create a container using an existing base image with the FROM
command. You can also copy the Dockerfile content of the base image, but this practice is highly discouraged because it does not make sense to duplicate the code that was already written when the image was created.
It is strongly recommended that you find official images in DockerHub. Since the Dockerfile is available, you should always read it in order to avoid security issues and fully understand how the image works.
Before dockerizing an application, it is important that you make your system use environmental variables instead of configuration files. In this way, you can create images...