Using Chef

Using Chef Note: Please note this is a community contributed installation path. Requirements To use this guide you’ll need a working installation of Chef. This cookbook supports a variety of operating systems. Installation The cookbook is available on the Chef Supermarket and can be installed using your favorite cookbook dependency manager. The source can be found on GitHub. Usage Add depends 'docker', '~> 2.0' to your cookbook’s metadata.rb Use resources shipped in cookbook in a recipe, t

Using certificates for repository client verification

Using certificates for repository client verification In Running Docker with HTTPS, you learned that, by default, Docker runs via a non-networked Unix socket and TLS must be enabled in order to have the Docker client and the daemon communicate securely over HTTPS. TLS ensures authenticity of the registry endpoint and that traffic to/from registry is encrypted. This article demonstrates how to ensure the traffic between the Docker registry (i.e., a server) and the Docker daemon (i.e., a client)

Understand the architecture

Understand the architecture Docker is an open platform for developing, shipping, and running applications. Docker is designed to deliver your applications faster. With Docker you can separate your applications from your infrastructure and treat your infrastructure like a managed application. Docker helps you ship code faster, test faster, deploy faster, and shorten the cycle between writing code and running code. Docker does this by combining kernel containerization features with workflows and

Understand images, containers, and storage drivers

Understand images, containers, and storage drivers To use storage drivers effectively, you must understand how Docker builds and stores images. Then, you need an understanding of how these images are used by containers. Finally, you’ll need a short introduction to the technologies that enable both images and container operations. Images and layers Each Docker image references a list of read-only layers that represent filesystem differences. Layers are stacked on top of each other to form a base

Understand container communication

Understand container communication The information in this section explains container communication within the Docker default bridge. This is a bridge network named bridge created automatically when you install Docker. Note: The Docker networks feature allows you to create user-defined networks in addition to the default bridge network. Communicating to the outside world Whether a container can talk to the world is governed by two factors. The first factor is whether the host machine is forward

Troubleshoot the application

Troubleshoot the application It’s a fact of life that things fail. With this in mind, it’s important to understand what happens when failures occur and how to mitigate them. The following sections cover different failure scenarios: Swarm manager failures Consul (discovery backend) failures Interlock load balancer failures Web (voting-app) failures Redis failures Worker (vote-worker) failures Postgres failures Results-app failures Infrastructure failures Swarm manager failures In it’s current

Swarm Overview

Docker Swarm overview Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual Docker host. Because Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts. Supported tools include, but are not limited to, the following: Dokku Docker Compose Docker Machine Jenkins And of course, the Docker client itself is also supported. Like other Docker projects, D

swarm manage

manage — Create a Swarm manager Prerequisite: Before using manage to create a Swarm manager, establish a discovery backend as described in this discovery topic. The manage command creates a Swarm manager whose purpose is to receive commands on behalf of the cluster and assign containers to Swarm nodes. You can create multiple Swarm managers as part of a high-availability cluster. To create a Swarm manager, use the following syntax: $ docker run swarm manage [OPTIONS] <discovery> For exam

swarm list

list — List the nodes in a cluster Use list to display a list of the nodes in a cluster. To list the nodes in a cluster, use the following syntax: docker run swarm list [OPTIONS] <discovery> The following examples show a few different syntaxes for the <discovery> argument: etcd: swarm list etcd://<etcd_addr1>,<etcd_addr2>/<optional path prefix> <node_ip:port> Consul: swarm list consul://<consul_addr>/<optional path prefix> <node_ip:port>

swarm join

join — Create a Swarm node Prerequisite: Before using join, establish a discovery backend as described in this discovery topic. The join command creates a Swarm node whose purpose is to run containers on behalf of the cluster. A typical cluster has multiple Swarm nodes. To create a Swarm node, use the following syntax: $ docker run swarm join [OPTIONS] <discovery> For example, to create a Swarm node in a high-availability cluster with other managers, enter: $ docker run -d swarm join --a