Run a local registry mirror

Run a local registry mirror The original content was deprecated. An archived version is available in the 1.7 documentation. For information about configuring mirrors with the latest Docker Registry version, please file a support request with the Distribution project.

docker stop

stop Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] Stop a container by sending SIGTERM and then SIGKILL after a grace period --help Print usage -t, --time=10 Seconds to wait for stop before killing it The main process inside the container will receive SIGTERM, and after a grace period, SIGKILL.

Dockerizing an apt-cacher-ng service

Dockerizing an apt-cacher-ng service Note: - If you don’t like sudo then see Giving non-root access. - If you’re using OS X or docker via TCP then you shouldn’t use sudo. When you have multiple Docker servers, or build unrelated Docker containers which can’t make use of the Docker build cache, it can be useful to have a caching proxy for your packages. This container makes the second download of any package almost instant. Use the following Dockerfile: # # Build: docker build -t apt-cacher .

docker-machine status

status Usage: docker-machine status [arg...] Get the status of a machine Description: Argument is a machine name. For example: $ docker-machine status dev Running

docker restart

restart Usage: docker restart [OPTIONS] CONTAINER [CONTAINER...] Restart a container --help Print usage -t, --time=10 Seconds to wait for stop before killing the container

docker attach

attach Usage: docker attach [OPTIONS] CONTAINER Attach to a running container --detach-keys="<sequence>" Set up escape key sequence --help Print usage --no-stdin Do not attach STDIN --sig-proxy=true Proxy all received signals to the process The docker attach command allows you to attach to a running container using the container’s ID or name, either to view its ongoing output or to control it interactively. Y

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

docker-compose kill

kill Usage: kill [options] [SERVICE...] Options: -s SIGNAL SIGNAL to send to the container. Default signal is SIGKILL. Forces running containers to stop by sending a SIGKILL signal. Optionally the signal can be passed, for example: $ docker-compose kill -s SIGINT

docker-compose exec

exec Usage: exec [options] SERVICE COMMAND [ARGS...] Options: -d Detached mode: Run command in the background. --privileged Give extended privileges to the process. --user USER Run the command as this user. -T Disable pseudo-tty allocation. By default `docker-compose exec` allocates a TTY. --index=index index of the container if there are multiple instances of a service [default: 1] This is equivalent of docker e