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

Installation on FrugalWare

FrugalWare Installing on FrugalWare is handled via the official packages: lxc-docker i686 lxc-docker x86_64 The lxc-docker package will install the latest tagged version of Docker. Dependencies Docker depends on several packages which are specified as dependencies in the packages. The core dependencies are: systemd lvm2 sqlite3 libguestfs lxc iproute2 bridge-utils Installation A simple $ sudo pacman -S lxc-docker is all that is needed. Starting Docker There is a systemd service unit create

Network configuration

Docker networks feature overview This sections explains how to use the Docker networks feature. This feature allows users to define their own networks and connect containers to them. Using this feature you can create a network on a single host or a network that spans across multiple hosts. Understand Docker container networks Work with network commands Get started with multi-host networking If you are already familiar with Docker’s default bridge network, docker0 that network continues to be

IBM Softlayer

IBM Softlayer Create machines on Softlayer. You need to generate an API key in the softlayer control panel. Retrieve your API key $ docker-machine create --driver softlayer --softlayer-user=user --softlayer-api-key=KEY --softlayer-domain=domain vm Options: --softlayer-memory: Memory for host in MB. --softlayer-disk-size: A value of 0 will set the SoftLayer default. --softlayer-user: required Username for your SoftLayer account, api key needs to match this user. --softlayer-api-key: require

Dockerizing a CouchDB service

Dockerizing a CouchDB service Note: - If you don’t like sudo then see Giving non-root access Here’s an example of using data volumes to share the same data between two CouchDB containers. This could be used for hot upgrades, testing different versions of CouchDB on the same data, etc. Create first database Note that we’re marking /var/lib/couchdb as a data volume. $ COUCH1=$(docker run -d -p 5984 -v /var/lib/couchdb shykes/couchdb:2013-05-03) Add data to the first database We’re assuming you

docker exec

exec Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG...] Run a command in a running container -d, --detach Detached mode: run command in the background --detach-keys Specify the escape key sequence used to detach a container --help Print usage -i, --interactive Keep STDIN open even if not attached --privileged Give extended Linux capabilities to the command -t, --tty Allocate a pseudo-TTY

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 provision

provision Re-run provisioning on a created machine. Sometimes it may be helpful to re-run Machine’s provisioning process on a created machine. Reasons for doing so may include a failure during the original provisioning process, or a drift from the desired system state (including the originally specified Swarm or Engine configuration). Usage is docker-machine provision [name]. Multiple names may be specified. $ docker-machine provision foo bar Copying certs to the local machine directory... Copy

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

swarm list

list — List the nodes in a cluster Use list to display a list of the nodes in a cluster. To list the nodes in a cluster, use the following syntax: docker run swarm list [OPTIONS] <discovery> The following examples show a few different syntaxes for the <discovery> argument: etcd: swarm list etcd://<etcd_addr1>,<etcd_addr2>/<optional path prefix> <node_ip:port> Consul: swarm list consul://<consul_addr>/<optional path prefix> <node_ip:port>