docker-compose build

build Usage: build [options] [SERVICE...] Options: --force-rm Always remove intermediate containers. --no-cache Do not use cache when building the image. --pull Always attempt to pull a newer version of the image. Services are built once and then tagged as project_service, e.g., composetest_db. If you change a service’s Dockerfile or the contents of its build directory, run docker-compose build to rebuild it.

Remote API v1.19

Docker Remote API v1.19 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-compose config

config Usage: config [options] Options: -q, --quiet Only validate the configuration, don't print anything. --services Print the service names, one per line. Validate and view the compose file.

docker port

port Usage: docker port [OPTIONS] CONTAINER [PRIVATE_PORT[/PROTO]] List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT --help Print usage You can find out all the ports mapped by not specifying a PRIVATE_PORT, or just a specific mapping: $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b650456536c7 busybo

OverlayFS storage in practice

Docker and OverlayFS in practice OverlayFS is a modern union filesystem that is similar to AUFS. In comparison to AUFS, OverlayFS: has a simpler design has been in the mainline Linux kernel since version 3.18 is potentially faster As a result, OverlayFS is rapidly gaining popularity in the Docker community and is seen by many as a natural successor to AUFS. As promising as OverlayFS is, it is still relatively young. Therefore caution should be taken before using it in production Docker enviro

docker build

build Usage: docker build [OPTIONS] PATH | URL | - Build a new image from the source code at PATH --build-arg=[] Set build-time variables --cpu-shares CPU Shares (relative weight) --cgroup-parent="" Optional parent cgroup for the container --cpu-period=0 Limit the CPU CFS (Completely Fair Scheduler) period --cpu-quota=0 Limit the CPU CFS (Completely Fair Scheduler) quota --cpuset-cpus=""

docker-machine restart

restart Usage: docker-machine restart [arg...] Restart a machine Description: Argument(s) are one or more machine names. Restart a machine. Oftentimes this is equivalent to docker-machine stop; docker-machine start. But some cloud driver try to implement a clever restart which keeps the same ip address. $ docker-machine restart dev Waiting for VM to start...

Installation on CentOS

CentOS Docker runs on CentOS 7.X. An installation on other binary compatible EL7 distributions such as Scientific Linux might succeed, but Docker does not test or support Docker on these distributions. 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 CentOS-managed packages, consult your CentOS documentation. Prerequisites Docker requires a 64-bit

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 commit

commit Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] Create a new image from a container's changes -a, --author="" Author (e.g., "John Hannibal Smith <hannibal@a-team.com>") -c, --change=[] Apply specified Dockerfile instructions while committing the image --help Print usage -m, --message="" Commit message -p, --pause=true Pause container during commit It can be useful to commit a container’s file changes or settings into a new image.