The Docker CLI
Go to file
Sebastiaan van Stijn 3c095dc546
Error if "until" filter is combined with "--volumes" on system prune
The "until" filter is supported by all object types, except for
volumes.

Before this patch, the "until" filter would attempted to be used for the volume
prune endpoint, resulting in an error being returned by the daemon, and
further prune endpoints (networks, images) to be skipped.

    $ docker system prune --filter until=24h --filter label=label.foo=bar

    WARNING! This will remove:
            - all stopped containers
            - all volumes not used by at least one container
            - all networks not used by at least one container
            - all dangling images
    Are you sure you want to continue? [y/N] y
    Error response from daemon: Invalid filter 'until'

    Calling POST /v1.30/containers/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D
    Calling POST /v1.30/volumes/prune?filters=%7B%22label%22%3A%7B%22label.foo%3D%3Dbar%22%3Atrue%7D%2C%22until%22%3A%7B%2224h%22%3Atrue%7D%7D
    Handler for POST /v1.30/volumes/prune returned error: Invalid filter 'until'
    Error response from daemon: Invalid filter 'until'

With this patch, an error is produced instead, preventing "partial" prune.

    $ docker system prune --filter until=24h --filter label=foo==bar --volumes
    ERROR: The "until" filter is not supported with "--volumes"

Note that `docker volume prune` does not have this problem, and produces an
error if the `until` filter is used;

    $ docker volume prune --filter until=24h

    WARNING! This will remove all volumes not used by at least one container.
    Are you sure you want to continue? [y/N] y
    Error response from daemon: Invalid filter 'until'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-21 12:11:53 +02:00
.github Add myself to command/stack codeowners 2017-07-20 12:05:20 -04:00
cli Error if "until" filter is combined with "--volumes" on system prune 2017-07-21 12:11:53 +02:00
cmd/docker fixed the output leak from daemon unit tests 2017-06-27 14:22:49 -04:00
contrib/completion Merge pull request #369 from jphuynh/completion-zsh-get-log-options 2017-07-21 11:25:17 +02:00
dockerfiles Cleanup dockerfiles and circle 2017-07-18 12:22:28 -04:00
docs Merge pull request #223 from ripcurld0/docs_cp_prm 2017-07-21 11:14:15 +02:00
experimental Fix Markdown formatting of experimental "stacks" 2017-06-20 15:15:08 -07:00
man docs: add documentation for dm.libdm_log_level 2017-07-14 16:52:33 +10:00
opts Add gosimple lint 2017-06-14 16:55:08 -07:00
scripts Add shellcheck for bash completion 2017-07-13 22:24:08 +01:00
vendor Merge pull request #291 from thaJeztah/bump-swarmkit 2017-07-21 11:07:38 +02:00
.dockerignore make go build and docker build operations faster 2017-04-27 15:06:57 -07:00
.gitignore Add scripts and targets for manpages and yamldocs 2017-06-05 19:10:44 +00:00
LICENSE Add project files 2017-04-17 17:49:33 -04:00
MAINTAINERS Add project files 2017-04-17 17:49:33 -04:00
Makefile Add shellcheck for bash completion 2017-07-13 22:24:08 +01:00
NOTICE Add project files 2017-04-17 17:49:33 -04:00
README.md Support running unit tests when files are saved. 2017-05-15 17:02:58 -04:00
VERSION Update version to 17.07-dev 2017-06-08 21:45:37 +02:00
circle.yml Cleanup dockerfiles and circle 2017-07-18 12:22:28 -04:00
codecov.yml Update codecov project threshold to 15% 2017-06-07 13:26:24 +02:00
docker.Makefile Merge pull request #266 from jphuynh/shellcheck 2017-07-18 09:59:07 +02:00
gometalinter.json Use a fork of gometalinter 2017-06-14 17:30:45 -07:00
poule.yml Add github templates and initial poule configuration 2017-05-09 16:57:46 +02:00
vendor.conf Merge pull request #291 from thaJeztah/bump-swarmkit 2017-07-21 11:07:38 +02:00

README.md

build status

docker/cli

This repository is the home of the cli used in the Docker CE and Docker EE products.

Development

docker/cli is developed using Docker.

Build a linux binary:

$ make -f docker.Makefile binary

Build binaries for all supported platforms:

$ make -f docker.Makefile cross

Run all linting:

$ make -f docker.Makefile lint

In-container development environment

Start an interactive development environment:

$ make -f docker.Makefile shell

In the development environment you can run many tasks, including build binaries:

$ make binary

Legal

Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.

Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, please see https://www.bis.doc.gov

Licensing

docker/cli is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.