Networking in Compose

Networking in Compose Note: This document only applies if you’re using version 2 of the Compose file format. Networking features are not supported for version 1 (legacy) Compose files. By default Compose sets up a single network for your app. Each container for a service joins the default network and is both reachable by other containers on that network, and discoverable by them at a hostname identical to the container name. Note: Your app’s network is given a name based on the “project name

swarm help

help - Display information about a command The help command displays information about how to use a command. For example, to see a list of Swarm options and commands, enter: $ docker run swarm --help To see a list of arguments and options for a specific Swarm command, enter: $ docker run swarm <command> --help For example: $ docker run swarm list --help Usage: swarm list [OPTIONS] <discovery> List nodes in a cluster Arguments: <discovery> discovery service to use [$S

Protect the Docker daemon socket

Protect the Docker daemon socket By default, Docker runs via a non-networked Unix socket. It can also optionally communicate using an HTTP socket. If you need Docker to be reachable via the network in a safe manner, you can enable TLS by specifying the tlsverify flag and pointing Docker’s tlscacert flag to a trusted CA certificate. In the daemon mode, it will only allow connections from clients authenticated by a certificate signed by that CA. In the client mode, it will only connect to servers

Extending Services in Compose

Extending services and Compose files Compose supports two methods of sharing common configuration: Extending an entire Compose file by using multiple Compose files Extending individual services with the extends field Multiple Compose files Using multiple Compose files enables you to customize a Compose application for different environments or different workflows. Understanding multiple Compose files By default, Compose reads two files, a docker-compose.yml and an optional docker-compose.ov

Using Compose with Swarm

Using Compose with Swarm Docker Compose and Docker Swarm aim to have full integration, meaning you can point a Compose app at a Swarm cluster and have it all just work as if you were using a single Docker host. The actual extent of integration depends on which version of the Compose file format you are using: If you’re using version 1 along with links, your app will work, but Swarm will schedule all containers on one host, because links between containers do not work across hosts with the old n

docker import

import Usage: docker import file|URL|- [REPOSITORY[:TAG]] Create an empty filesystem image and import the contents of the tarball (.tar, .tar.gz, .tgz, .bzip, .tar.xz, .txz) into it, then optionally tag it. -c, --change=[] Apply specified Dockerfile instructions while importing the image --help Print usage -m, --message= Set commit message for imported image You can specify a URL or - (dash) to take data directly from STDIN. The URL can point to an archive (.tar,

Amazon CloudWatch Logs logging driver

Amazon CloudWatch Logs logging driver The awslogs logging driver sends container logs to Amazon CloudWatch Logs. Log entries can be retrieved through the AWS Management Console or the AWS SDKs and Command Line Tools. Usage You can configure the default logging driver by passing the --log-driver option to the Docker daemon: docker daemon --log-driver=awslogs You can set the logging driver for a specific container by using the --log-driver option to docker run: docker run --log-driver=awslogs ..

docker-machine active

active See which machine is “active” (a machine is considered active if the DOCKER_HOST environment variable points to it). $ docker-machine ls NAME ACTIVE DRIVER STATE URL dev - virtualbox Running tcp://192.168.99.103:2376 staging * digitalocean Running tcp://203.0.113.81:2376 $ echo $DOCKER_HOST tcp://203.0.113.81:2376 $ docker-machine active staging

Docker Glossary

Glossary A list of terms used around the Docker project. aufs aufs (advanced multi layered unification filesystem) is a Linux filesystem that Docker supports as a storage backend. It implements the union mount for Linux file systems. Base image An image that has no parent is a base image. boot2docker boot2docker is a lightweight Linux distribution made specifically to run Docker containers. The boot2docker management tool for Mac and Windows was deprecated and replaced by docker-machine which y

Deprecated Engine Features

Deprecated Engine Features The following list of features are deprecated in Engine. -e and --email flags on docker login Deprecated In Release: v1.11 Target For Removal In Release: v1.13 The docker login command is removing the ability to automatically register for an account with the target registry if the given username doesn’t exist. Due to this change, the email flag is no longer required, and will be deprecated. Separator (:) of --security-opt flag on docker run Deprecated In Release: v