🌐 🇵🇱 Polski · 🇬🇧 EN
As with any tool, there are established methods and patterns that facilitate working with Docker. Aligning organizational workflows with those imposed by Docker has a proven positive impact on team performance and minimizes the communication overhead. All of this is done to operate more efficiently and deliver well-prepared solutions faster, which can then be elegantly deployed and utilized. To achieve these goals, it is necessary to familiarize yourself with several mechanisms offered by Docker to better understand how it works and how to use it. This knowledge serves as a short guide to working with Docker, from which you will learn what we actually accomplish using this tool. While it is best to test its operation personally, it is also worth knowing what capabilities are available and what to expect.
Version control.
With Docker, we get tools for version control that come in two varieties. First, we have the ability to specify versions of images, or more precisely, the filesystem layers they are built from; the second option is the container tagging system.
Containers are nothing more than stacked filesystem layers marked with unique character strings, organized in a hierarchy such that each new set of changes constituting a new image is placed at the top. Thanks to this, a new build forces the rebuilding of only those layers directly affected by a given change. Consequently, there is no need to deliver previous layers to servers, only the changed ones. Furthermore, we can easily check what the last version of the deployed application was, thanks to the mechanism built into Docker for tagging images at the time of deployment. This solution should be used as it significantly facilitates maintaining proper order, even if versioning tools like GIT or Capistrano are in use.
Building an image.
As I wrote earlier, working with Docker involves using images. From the command line tool, we have access to the build parameter, which allows for the creation of a Docker image based on a Dockerfile. Each time, the commands in the Dockerfile create a new layer within the image. Everything contained within the Dockerfile itself constitutes a set of instructions that will be executed to build the image. The fact that subsequent steps are located in a single file allows for its editing and influencing how the final image will look. Since building usually boils down to executing a single docker build command, resulting in a single artifact—the container image—and all the build logic is encapsulated in one Dockerfile, it is easy to create and define standardization for image creation so that they are suitable for use in systems like Jenkins. The advantage of containerization is also the facilitated and organized testing process, where you can be sure that exactly the application that has been properly verified, along with all its required libraries, is entering production.
Package portability.
Because using Docker boils down to working with containers as individual "objects," it ceases to matter what language the application was written in or which Linux distribution it will run on. Everything required for the application to function is contained within the multi-layered image and handled by Docker tools. Applications whose configuration previously required a significant amount of work gain incredible portability once treated as a container in which everything has already been configured and is ready to run, thus making application deployment significantly simpler.
Additional tools.
Because a large and active OpenSource community related to various other technologies operates around Docker, more and more tools are appearing that improve work with Docker and expand its capabilities. Below is a list of a few of them.
Package portability.
Because using Docker boils down to working with containers as individual "objects," it ceases to matter what language the application was written in or which Linux distribution it will run on. Everything required for the application to function is contained within the multi-layered image and handled by Docker tools. Applications whose configuration previously required a significant amount of work gain incredible portability once treated as a container in which everything has already been configured and is ready to run, thus making application deployment significantly simpler.
Additional tools.
Because a large and active OpenSource community related to various other technologies operates around Docker, more and more tools are appearing that improve work with Docker and expand its capabilities. Below is a list of a few of them.

Comments