Environment file

Environment file Compose supports declaring default environment variables in an environment file named .env placed in the folder docker-compose command is executed from (current working directory). Compose expects each line in an env file to be in VAR=VAL format. Lines beginning with # (i.e. comments) are ignored, as are blank lines. Note: Values present in the environment at runtime will always override those defined inside the .env file. Similarly, values passed via command-line arguments ta

Installation on Ubuntu

Ubuntu Docker is supported on these Ubuntu operating systems: Ubuntu Xenial 16.04 (LTS) Ubuntu Wily 15.10 Ubuntu Trusty 14.04 (LTS) Ubuntu Precise 12.04 (LTS) This page instructs you to install using Docker-managed release packages and installation mechanisms. Using these packages ensures you get the latest release of Docker. If you wish to install using Ubuntu-managed packages, consult your Ubuntu documentation. Note: Ubuntu Utopic 14.10 and 15.04 exist in Docker’s APT repository but are no

Link via an ambassador container

Link via an ambassador container Rather than hardcoding network links between a service consumer and provider, Docker encourages service portability, for example instead of: (consumer) --> (redis) Requiring you to restart the consumer to attach it to a different redis service, you can add ambassadors: (consumer) --> (redis-ambassador) --> (redis) Or (consumer) --> (redis-ambassador) ---network---> (redis-ambassador) --> (redis) When you need to rewire your consumer to talk

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

AppArmor security profiles for Docker

AppArmor security profiles for Docker AppArmor (Application Armor) is a Linux security module that protects an operating system and its applications from security threats. To use it, a system administrator associates an AppArmor security profile with each program. Docker expects to find an AppArmor policy loaded and enforced. Docker automatically loads container profiles. The Docker binary installs a docker-default profile in the /etc/apparmor.d/docker file. This profile is used on containers,

docker-compose scale

scale Usage: scale [SERVICE=NUM...] Sets the number of containers to run for a service. Numbers are specified as arguments in the form service=num. For example: $ docker-compose scale web=2 worker=3

Example: Use Docker Machine to provision cloud hosts

Example: Use Docker Machine to provision cloud hosts Docker Machine driver plugins are available for many cloud platforms, so you can use Machine to provision cloud hosts. When you use Docker Machine for provisioning, you create cloud hosts with Docker Engine installed on them. You’ll need to install and run Docker Machine, and create an account with the cloud provider. Then you provide account verification, security credentials, and configuration options for the providers as flags to docker-ma

Installation on Red Hat Enterprise Linux

Red Hat Enterprise Linux Docker is supported on Red Hat Enterprise Linux 7. This page instructs you to install using Docker-managed release packages and installation mechanisms. Using these packages ensures you get the latest release of Docker. If you wish to install using Red Hat-managed packages, consult your Red Hat release documentation for information on Red Hat’s Docker support. Prerequisites Docker requires a 64-bit installation regardless of your Red Hat version. Docker requires that yo

Link Environment Variables

Link environment variables reference Note: Environment variables are no longer the recommended method for connecting to linked services. Instead, you should use the link name (by default, the name of the linked service) as the hostname to connect to. See the docker-compose.yml documentation for details. Environment variables will only be populated if you’re using the legacy version 1 Compose file format. Compose uses Docker links to expose services’ containers to one another. Each linked cont

docker network inspect

network inspect Usage: docker network inspect [OPTIONS] NETWORK [NETWORK..] Displays detailed information on a network -f, --format= Format the output using the given go template. --help Print usage Returns information about one or more networks. By default, this command renders all results in a JSON object. For example, if you connect two containers to the default bridge network: $ sudo docker run -itd --name=container1 busybox f2870c98fd504370fb86e59f32cd0753b1ac9b69