Docker — Beginner Notes

  1. Containers usually contain an application and its dependencies, such as libraries and frameworks. Multiple containers can run on a single host.
  2. Containers decouple applications from operating systems so that you can have a clean and minimal Linux operating system and run everything else in some form of containers. Because a container offers a convenient unit to encapsulate a small application component, it’s a good infrastructure for building micro-service applications, which enable manageable application infrastructure and continuous application deliveries.
  3. Containers are just a process (or a group of processes) running in isolation, which is achieved with Linux namespaces and control groups. Linux namespaces and control groups are features that are built into the Linux kernel. Other than the Linux kernel itself, there is nothing special about containers.
  4. Containers achieve isolation because of ‘namespaces’ feature in the Linux kernel
  5. A container separates the bridges b/w Dev and Ops in DevOps
    Dev: Focus on Application Development
    - Code/Libraries/Configuration/Server Runtime/OS
    Ops: Focus on Deployment Environment
    - Logging/Remote Access/Network Configuration/Monitoring
  6. Docker is an open platform for developers and system administrators to build distributed applications.
  7. With Docker, you can manage your infrastructure in the same ways that you manage your applications. By taking advantage of Docker methodologies for shipping, testing, and quickly deploying code, you can reduce the delay between writing code and running it in production i.e Docker provides developers and operators with a friendly interface to build, ship, and run containers on any environment.
  8. LinuxKit makes it possible to run Docker containers on operating systems other than Linux
  9. Use the Dockerfile to create reproducible builds for your application and to integrate your application with Docker into the CI/CD pipeline.
  10. Docker images can be made available to all of your environments through a central registry. The Docker Hub is one example of a registry, but you can deploy your own registry on servers you control.
  11. A Docker image contains all the dependencies that it needs to run an application within the image. This is useful because you no longer need to deal with environment drift (version differences) when you rely on dependencies that are installed on every environment you deploy to.
  12. Docker uses of the union file system and “copy-on-write” to reuse layers of images. This lowers the footprint of storing images and significantly increases the performance of starting containers.
  13. Image layers are cached by the Docker build and push system. There’s no need to rebuild or repush image layers that are already present on a system.
  14. Each line in a Dockerfile creates a new layer, and because of the layer cache, the lines that change more frequently, for example, adding source code to an image, should be listed near the bottom of the file
Docker Cheat Sheet
Container Ecosystem layers

Docker Swarm

  • Docker Swarm schedules services by using a declarative language. You declare the state, and the swarm attempts to maintain and reconcile to make sure the actual state equals the desired state.
  • Docker Swarm is composed of manager and worker nodes. Only managers can maintain the state of the swarm and accept commands to modify it. Workers have high scalability and are only used to run containers. By default, managers can also run containers.
  • The routing mesh built into Docker Swarm means that any port that is published at the service level will be exposed on every node in the swarm. Requests to a published service port will be automatically routed to a container of the service that is running in the swarm.

Terminologies

Recommendations

--

--

--

Here to explore and learn

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Introduction to Linear Programming

Bringing the cloud to 5G edge with AWS Wavelength

Spyder IDE and Windows Command Prompt: A beginner’s first walk-through experience in programming.

Leap Motion + Unity3D: Playing with virtual blocks using my real hands!

PLAYER REWARD POOLS AND LOBBIES COMING SOON

Export Data Slice EPM REST API

Understanding programming concepts for non-programmers

Installing Python and Jupyter Notebook

Double click the installer to have this screen  Next button.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Deepak Kashyap

Deepak Kashyap

Here to explore and learn

More from Medium

How to install and configure git?

MuleSoft Certified Developer Level-1 RoadMap & Resources

‘If’ Statements on Github Actions