Btrfs storage in practice

Docker and Btrfs in practice Btrfs is a next generation copy-on-write filesystem that supports many advanced storage technologies that make it a good fit for Docker. Btrfs is included in the mainline Linux kernel and its on-disk-format is now considered stable. However, many of its features are still under heavy development and users should consider it a fast-moving target. Docker’s btrfs storage driver leverages many Btrfs features for image and container management. Among these features are t

Driver options and operating system defaults

Driver options and operating system defaults When Docker Machine provisions containers on local network provider or with a remote, cloud provider such as Amazon Web Services, you must define both the driver for your provider and a base operating system. There are over 10 supported drivers and a generic driver for adding machines for other providers. Each driver has a set of options specific to that provider. These options provide information to machine such as connection credentials, ports, and

Installation from binaries

Installation from binaries This instruction set is meant for hackers who want to try out Docker on a variety of environments. Before following these directions, you should really check if a packaged version of Docker is already available for your distribution. We have packages for many distributions, and more keep showing up all the time! Check runtime dependencies To run properly, docker needs the following software to be installed at runtime: iptables version 1.4 or later Git version 1.7 or l

Automatically start containers

Automatically start containers As of Docker 1.2, restart policies are the built-in Docker mechanism for restarting containers when they exit. If set, restart policies will be used when the Docker daemon starts up, as typically happens after a system boot. Restart policies will ensure that linked containers are started in the correct order. If restart policies don’t suit your needs (i.e., you have non-Docker processes that depend on Docker containers), you can use a process manager like upstart,

Control and configure Docker with systemd

Control and configure Docker with systemd Many Linux distributions use systemd to start the Docker daemon. This document shows a few examples of how to customize Docker’s settings. Starting the Docker daemon Once Docker is installed, you will need to start the Docker daemon. $ sudo systemctl start docker # or on older distributions, you may need to use $ sudo service docker start If you want Docker to start at boot, you should also: $ sudo systemctl enable docker # or on older distributions, y

docker network rm

network rm Usage: docker network rm [OPTIONS] NETWORK [NETWORK...] Deletes one or more networks --help Print usage Removes one or more networks by name or identifier. To remove a network, you must first disconnect any containers connected to it. To remove the network named ‘my-network’: $ docker network rm my-network To delete multiple networks in a single docker network rm command, provide multiple network names or ids. The following example deletes a network with id 3695c

Remote API v1.22

Docker Remote API v1.22 1. Brief introduction The Remote API has replaced rcli. The daemon listens on unix:///var/run/docker.sock but you can Bind Docker to another host/port or a Unix socket. The API tends to be REST. However, for some complex commands, like attach or pull, the HTTP connection is hijacked to transport stdout, stdin and stderr. When the client API version is newer than the daemon’s, these calls return an HTTP 400 Bad Request error message. 2. Endpoints 2.1 Containers List con

docker network connect

network connect Usage: docker network connect [OPTIONS] NETWORK CONTAINER Connects a container to a network --alias=[] Add network-scoped alias for the container --help Print usage --ip IPv4 Address --ip6 IPv6 Address --link=[] Add a link to another container Connects a container to a network. You can connect a container by name or by ID. Once connected, the container can communicate with other containers in the same network.

docker-machine regenerate-certs

regenerate-certs Usage: docker-machine regenerate-certs [OPTIONS] [arg...] Regenerate TLS Certificates for a machine Description: Argument(s) are one or more machine names. Options: --force, -f Force rebuild and do not prompt Regenerate TLS certificates and update the machine with new certs. For example: $ docker-machine regenerate-certs dev Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y Regenerating TLS certificates

Store images on Docker Hub

Store images on Docker Hub So far you’ve learned how to use the command line to run Docker on your local host. You’ve learned how to pull down images to build containers from existing images and you’ve learned how to create your own images. Next, you’re going to learn how to use the Docker Hub to simplify and enhance your Docker workflows. The Docker Hub is a public registry maintained by Docker, Inc. It contains images you can download and use to build containers. It also provides authenticati