Build a Swarm cluster for production

Build a Swarm cluster for production This page teaches you to deploy a high-availability Docker Swarm cluster. Although the example installation uses the Amazon Web Services (AWS) platform, you can deploy an equivalent Docker Swarm cluster on many other platforms. In this example, you do the following: Verify you have the prequisites Establish basic network security Create your nodes Install Engine on each node Configure a discovery backend Create Swarm cluster Communicate with the Swarm Test t

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

Controlling startup order

Controlling startup order in Compose You can control the order of service startup with the depends_on option. Compose always starts containers in dependency order, where dependencies are determined by depends_on, links, volumes_from and network_mode: "service:...". However, Compose will not wait until a container is “ready” (whatever that means for your particular application) - only until it’s running. There’s a good reason for this. The problem of waiting for a database (for example) to be re

docker login

login Usage: docker login [OPTIONS] [SERVER] Log in to a Docker registry server, if no server is specified "https://index.docker.io/v1/" is the default. --help Print usage -p, --password="" Password -u, --username="" Username If you want to login to a self-hosted registry you can specify this by adding the server name. example: $ docker login localhost:8080 docker login requires user to use sudo or be root, except when: connecting to a remote daemon, such as a dock

Apply custom metadata

Apply custom metadata You can apply metadata to your images, containers, or daemons via labels. Labels serve a wide range of uses, such as adding notes or licensing information to an image, or to identify a host. A label is a <key> / <value> pair. Docker stores the label values as strings. You can specify multiple labels but each <key> must be unique or the value will be overwritten. If you specify the same key several times but with different values, newer labels overwrite pr

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

Best practices for writing Dockerfiles

Best practices for writing Dockerfiles Docker can build images automatically by reading the instructions from a Dockerfile, a text file that contains all the commands, in order, needed to build a given image. Dockerfiles adhere to a specific format and use a specific set of instructions. You can learn the basics on the Dockerfile Reference page. If you’re new to writing Dockerfiles, you should start there. This document covers the best practices and methods recommended by Docker, Inc. and the D

docker start

start Usage: docker start [OPTIONS] CONTAINER [CONTAINER...] Start one or more containers -a, --attach Attach STDOUT/STDERR and forward signals --detach-keys Specify the escape key sequence used to detach a container --help Print usage -i, --interactive Attach container's STDIN

docker-compose start

start Usage: start [SERVICE...] Starts existing containers for a service.

docker-machine config

config Usage: docker-machine config [OPTIONS] [arg...] Print the connection config for machine Description: Argument is a machine name. Options: --swarm Display the Swarm config instead of the Docker daemon For example: $ docker-machine config dev --tlsverify --tlscacert="/Users/ehazlett/.docker/machines/dev/ca.pem" --tlscert="/Users/ehazlett/.docker/machines/dev/cert.pem" --tlskey="/Users/ehazlett/.docker/machines/dev/key.pem" -H tcp://192.168.99.103:2376