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

Strategies

Docker Swarm strategies The Docker Swarm scheduler features multiple strategies for ranking nodes. The strategy you choose determines how Swarm computes ranking. When you run a new container, Swarm chooses to place it on the node with the highest computed ranking for your chosen strategy. To choose a ranking strategy, pass the --strategy flag and a strategy value to the swarm manage command. Swarm currently supports these values: spread binpack random The spread and binpack strategies compute

docker run

run Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] Run a command in a new container -a, --attach=[] Attach to STDIN, STDOUT or STDERR --add-host=[] Add a custom host-to-IP mapping (host:ip) --blkio-weight=0 Block IO weight (relative weight) --blkio-weight-device=[] Block IO weight (relative device weight, format: `DEVICE_NAME:WEIGHT`) --cpu-shares=0 CPU shares (relative weight) --cap-add=[] Add L

docker-compose pull

pull Usage: pull [options] [SERVICE...] Options: --ignore-pull-failures Pull what it can and ignores images with pull failures. Pulls service images.

docker-compose pause

pause Usage: pause [SERVICE...] Pauses running containers of a service. They can be unpaused with docker-compose unpause.

Getting Started

Getting Started On this page you build a simple Python web application running on Docker Compose. The application uses the Flask framework and increments a value in Redis. While the sample uses Python, the concepts demonstrated here should be understandable even if you’re not familiar with it. Prerequisites Make sure you have already installed both Docker Engine and Docker Compose. You don’t need to install Python, it is provided by a Docker image. Step 1: Setup Create a directory for the proj

Manage data in containers

Manage data in containers So far you’ve been introduced to some basic Docker concepts, seen how to work with Docker images as well as learned about networking and links between containers. In this section you’re going to learn how you can manage data inside and between your Docker containers. You’re going to look at the two primary ways you can manage data with Docker Engine. Data volumes Data volume containers Data volumes A data volume is a specially-designated directory within one or more

Plugins API

Docker Plugin API Docker plugins are out-of-process extensions which add capabilities to the Docker Engine. This page is intended for people who want to develop their own Docker plugin. If you just want to learn about or use Docker plugins, look here. What plugins are A plugin is a process running on the same or a different host as the docker daemon, which registers itself by placing a file on the same docker host in one of the plugin directories described in Plugin discovery. Plugins have huma

Introduction

Engine user guide This guide takes you through the fundamentals of using Docker Engine and integrating it into your environment. You’ll learn how to use Engine to: Dockerize your applications. Run your own containers. Build Docker images. Share your Docker images with others. And a whole lot more! This guide is broken into major sections that take you through learning the basics of Docker Engine and the other Docker products that support it. Dockerizing applications: A “Hello world” How do I

Docker run reference

Docker run reference Docker runs processes in isolated containers. A container is a process which runs on a host. The host may be local or remote. When an operator executes docker run, the container process that runs is isolated in that it has its own file system, its own networking, and its own isolated process tree separate from the host. This page details how to use the docker run command to define the container’s resources at runtime. General form The basic docker run command takes this for