What is Docker?

Docker

Docker is a platform that allows developers to easily create, deploy, and run applications in containers. Containers are lightweight, portable, and self-sufficient units that can run anywhere, making them an ideal solution for microservices and other distributed applications.

Docker uses a technology called containerization, which is an operating-system-level virtualization method for running multiple isolated systems on a single host. Each container runs its own operating system, libraries, and application code, and is completely isolated from other containers and the host system. This allows for efficient resource utilization and consistent behavior across different environments.

A package of code and dependencies to run that code. ie. (Java Code + JRE). Once a container is created it always executes and behaves in the same way.

Docker also provides a centralized registry, called Docker Hub, where developers can share and distribute their containerized applications. This makes it easy for others to reuse and build upon existing work, and greatly simplifies the process of creating, testing, and deploying applications.

Benefit of Containers

Containers are the units of software, our packages with code and with the dependencies to run this code, and we can then take it anywhere where Docker runs and we will then be able to run exactly the same application with the same environment, wherever that is. We don't need to worry about installing any extra tools in that place where we wanna run our application because it's all in the container.

That is what containers are, and that is what Docker is about. Because Docker is just the tool for building these containers.

Now, the good thing is that support for containers is built into modern operating systems or at least there it's easy to get started with them, and Docker can be installed on all modern operating systems to then work with it there.

Docker then in the end is a tool that simplifies the creation and management process of these containers.

You wouldn't need it to create containers but it's the de facto standard for doing that since it makes that task so super simple.

What is Docker in brief?

  1. Docker is great at building and sharing disk images with others through the Docker Hub.
  2. Docker is a manager for infrastructure (today's bindings are for Linux Containers, but future bindings including KVM, Hyper-V, Xen, etc.)
  3. Docker is a great image distribution model for server templates built with Configuration * Managers (like Chef, Puppet, SaltStack, etc)
  4. Docker uses btrfs (a copy-on-write filesystem) to keep track of filesystem diff's which can be committed and collaborated on with other users (like git)
  5. Docker has a central repository of disk images (public and private) that allow you to easily run different operating systems (Ubuntu, Centos, Fedora, even Gentoo)

What Isn't Docker?

  1. Docker is NOT a Linux Container technology (like LXC)
  2. Docker is NOT limited to just LXC anymore (can theoretically manage VMs in the future)
  3. Docker is NOT a Configuration Manager replacement (like Chef, Puppet, SaltStack, etc)
  4. Docker is NOT a PaaS
  5. Docker is NOT good at linking across separate servers or VMs.
  6. Docker is NOT good at isolating Linux Containers from each other (shared kernel)

When To Use Docker?

Docker is a basic tool, like git or java, that you should start incorporating into your daily development and ops practices.

  1. Use Docker as a version control system for your entire app's operating system
  2. Use Docker when you want to distribute/collaborate on your app's operating system with a team
  3. Use Docker to run your code on your laptop in the same environment as you have on your server.
  4. Use Docker whenever your app needs to go through multiple phases of development (dev/test/qa/prod)

Docker has gained popularity in recent years due to its ease of use, flexibility, and scalability. It is widely used in development, testing, and production environments and has become an essential tool for many organizations.

To get started with Docker, you will need to install the Docker software on your computer, and then you can begin creating and running containers. The Docker documentation provides a great starting point for learning more about the platform and its capabilities.

Conclusions

Docker is changing the face of development for our generation. The Docker community is already curating and cultivating generic service containers that anyone can use as starting points. The fact that you can use these Docker containers on any system that runs the Docker server is an incredible feat of engineering.