1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

23 commits

Author SHA1 Message Date
Alfred Landrum
32da2a4234
prevent image prune panic
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
2017-05-26 12:54:39 -07:00
Alessandro Boch
9ee7b4dda9 Support configuration networks
- They are configuration-only networks which
  can be used to supply the configuration
  when creating regular networks.
- They do not get allocated and do net get plumbed.
  Drivers do not get to know about them.
- They can be removed, once no other network is
  using them.
- When user creates a network specifying a
  configuration network for the config, no
  other network specific configuration field
  is are accepted. User can only specify
  network operator fields (attachable, internal,...)

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-17 15:50:28 -07:00
allencloud
2a8f46abfd unexport error errPruneRunning
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-05-16 23:37:30 +08:00
Gaetan de Villele
71760ae648 daemon refuses unknown filters in prune functions
- container prune
- volume prune
- image prune
- network prune

Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
2017-05-05 09:37:06 -07:00
Kenfe-Mickael Laventure
3279ca3c00 Prevent multiple identical parallel pruning operations
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-24 09:13:05 -07:00
Kenfe-Mickael Laventure
0dee69799e Honor context cancellation when pruning
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-04-24 09:11:29 -07:00
Yong Tang
7025247324 Add label filter for docker system prune
This fix tries to address the issue raised in 29999 where it was not
possible to mask these items (like important non-removable stuff)
from `docker system prune`.

This fix adds `label` and `label!` field for `--filter` in `system prune`,
so that it is possible to selectively prune items like:
```
$ docker container prune --filter label=foo

$ docker container prune --filter label!=bar
```

Additional unit tests and integration tests have been added.

This fix fixes 29999.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-04-06 09:11:25 -07:00
Sebastiaan van Stijn
4f2ed03092 Fix docker system prune failing with Swarm mode disabled
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-03-28 16:35:24 +02:00
Alessandro Boch
d59d19c328 Allow user to modify ingress network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-26 15:46:18 -07:00
Akihiro Suda
9a5bf4b5ad Merge pull request #29779 from thaJeztah/do-not-return-incorrect-error
NetworksPrune: do not return warnings as error
2017-03-21 16:28:54 +09:00
Tonis Tiigi
bd33a99acf Don’t hold container lock for size calculation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-02-18 18:11:48 -08:00
Derek McGowan
3a1279393f
Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-02-07 11:08:37 -08:00
Sebastiaan van Stijn
06c4c5f499
NetworksPrune: do not return warnings as error
`NetworksPrune()` is designed to ignore errors
encountered during removal of networks, and only
print them as warnings.

However, the last error encountered was returned
by the function, resulting in the prune command
to be reported as "failing" wheras it did not.

In addition, in situations where a network
failed to be removed, the networks that
_were_ succesfully removed were not reported
back.

This patch changes the function to not return
the error, and to return the list of networks
that were succesfully removed at all times.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-02-05 16:18:27 -08:00
Alexander Morozov
a69c4129e0 Merge pull request #28409 from dnephin/swagger-gen-more
Generate more types from the swagger spec
2017-01-26 10:35:34 -08:00
Kenfe-Mickael Laventure
044fa10309 Prune named but untagged images if danglingOnly=true
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-23 11:45:57 -08:00
Sebastiaan van Stijn
f1fdbeca2a Merge pull request #29226 from yongtang/28535-prune-until-follow-up
Add `--filter until=<timestamp>` for `docker container/image prune`
2017-01-09 17:58:01 +01:00
Stephen J Day
7a85579917
*: use opencontainers/go-digest package
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-06 18:48:41 -08:00
Yong Tang
58738cdee3 Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-04 14:16:42 -08:00
Daniel Nephin
5988b84e4f Generate ImageDeleteResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Yong Tang
a6be56b54e Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-02 20:08:49 -08:00
Akihiro Suda
7e24c16086 add docker network prune
`docker network prune` prunes unused networks, including overlay ones.
`docker system prune` also prunes unused networks.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-10-25 06:43:54 +00:00
allencloud
fd62b6c950 better prune and system df
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-10-11 00:42:21 +08:00
Kenfe-Mickael Laventure
33f4d68f4d Add /{containers,volumes,images}/prune API endpoint
These new endpoints request the daemon to delete all resources
considered "unused" in their respective category:
  - all stopped containers
  - all volumes not attached to any containers
  - images with no associated containers

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-29 07:42:53 -07:00