Full overview about Docker, What it can be used for, it's architecture and the underling technologies, plus Docker versioning schema and installation guide.
➔ Do you use it in development ? ➔ Do you use it in production ? ❏ Who tried but couldn’t do it ? ❏ Who uses Windows ? ❏ Who uses macOS ? ❏ Who uses Linux ?
you should understand first ? What we can use docker for ? Docker architecture. Docker objects such as images and containers. The underlying technology behind Docker. SETUP Docker’s New Versioning scheme Installing on Windows 10 (Pro or Enterprise) Installing on Windows 7, 8, or 10 Home Edition Installing on Mac Installing on Linux Other Options More info about Docker can be found at https://goo.gl/w3iKIw
Isolate applications Both have different use cases You can think of VMs as houses (Fully self contained and have its own infrastructure) You can think of containers as apartments (Built around shared infrastructure)
applications Docker containers can standardize environments during dev lifecycle. Containers are great for continuous integration and continuous development (CI/CD) Code & run on local containers, automate or manually test on test containers and push images To production Responsive deployment and scaling Highly portable. Containers can run on local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments. Lightweight. Dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time Running more workloads on the same hardware A viable, cost-effective alternative to hypervisor-based virtual machines Perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.
is a service that runs on your host operating system. It currently only runs on Linux because it depends on a number of Linux kernel features, but there are a few ways to run Docker on MacOS and Windows too. REST API The Docker daemon itself exposes a REST API. From here, a number of different tools can talk to the daemon through this API. Docker CLI It is a command line tool that lets you talk to the Docker daemon. When you install Docker, you get both the Docker daemon and the Docker CLI tools together. https://goo.gl/RfyRx6
application. The daemon is the server, and the CLI is 1 of many clients. You can use the client to manage many different components of the daemon such as images, containers, networks and data volumes. @nickjanetakis
could be installed on your laptop running Windows, MacOS or a server running Linux, it doesn’t matter. This is where we find and download Docker images. Docker Hub and Docker Cloud are public registries that anyone can use, and Docker is configured to look for images on Docker Hub by default. This is typically referred to as the server running the Docker daemon. It’s the host that happens to be running the Docker daemon. The key take away here is, the client and the daemon does not need to be on the same box. https://goo.gl/RfyRx6
represent filesystem differences. Layers are stacked on top of each other to form a base for a container’s root filesystem. The diagram shows the Ubuntu 15.04 image comprising 4 stacked image layers. https://goo.gl/j31qGf
top of the underlying stack. This layer is often called the “container layer” All changes made to the running container - such as writing new files, modifying existing files, and deleting files - are written to this thin writable container layer. https://goo.gl/j31qGf
and all changes are stored in this container layer, this means that multiple containers can share access to the same underlying image and yet have their own data state. Two key technologies behind Docker image and container management are stackable image layers and copy-on-write (CoW). https://goo.gl/j31qGf
called the container. When you run a container. These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace. Control groups A cgroup limits an application to a specific set of resources. It also allow Docker Engine to share available hardware resources to containers and optionally enforce limits and constraints. Union file systems UnionFS are file systems that operate by creating layers, making them very lightweight and fast. Docker Engine uses UnionFS to provide the building blocks for containers. Container format Docker Engine combines the namespaces, control groups, and UnionFS into a wrapper called a container format. The default container format is libcontainer. In the future, Docker may support other container formats by integrating with technologies such as BSD Jails or Solaris Zones. Docker is written in Go and takes advantage of several features of the Linux kernel to deliver its functionality. https://goo.gl/w3iKIw
is the best experience on Windows, but due to OS feature requirements, it only works on the Pro and Enterprise editions of Windows 10 (with latest update rollups). You need to install "Docker for Windows" from the Docker Store. Installing on Windows 7, 8, or 10 Home Edition Unfortunately, Microsoft's OS features for Docker and Hyper-V don't work in these older versions, and "Home" edition doesn't have Hyper-V, so you'll need to install the Docker Toolbox, which is a slightly different approach to using Docker with a VirtualBox VM. Installing on Mac You'll want to install Docker for Mac, which is great. If you're on an older Mac with less then OSX Yosemite 10.10.3, you'll need to install the Docker Toolbox instead. Installing on Linux I prefer to use the Docker's automated script to add their repository and install all dependencies: curl -sSL https://get.docker.com/ | sh but you can also install in a more manual method by following specific instructions on Docker's site for your distribution, like this one for Ubuntu. https://goo.gl/xPJrrp What if None Of These Options Work Maybe you don't have local admin, or maybe your machine doesn't have enough resources. Well the best free option here is to use play-with-docker.com, which will run one or more Docker instances inside your browser, and give you a terminal to use it with.
machines and make sure it’s up and running Get started with Docker for Windows Get started with Docker for Mac Get Docker for Ubuntu Docker Toolbox Install Docker Toolbox on Windows Install Docker Toolbox on macOS