docker rmi --unused #9054

Closed
SamSaffron opened this Issue Nov 9, 2014 · 28 comments

Comments

Projects
None yet
@SamSaffron

I raised this discussion here

https://forums.docker.com/t/command-to-remove-all-unused-images/20

To recap we often find ourselves with systems saturated with unused images, it would be super awesome if we had a simple way of cleaning up.

Eg:

docker rmi --unused
# remove all images that are not referenced by active containers

This is tricky to script as you need to walk through dependencies, the workaround is just to ignore the errors from rmi, but it feels unclean.

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit Nov 10, 2014

Contributor

Docker rmi with dangling=true unsafe while images are being pulled #8926

Contributor

SvenDowideit commented Nov 10, 2014

Docker rmi with dangling=true unsafe while images are being pulled #8926

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Nov 10, 2014

Contributor

I think dangling is only untagged images as well.
You should be able to just docker rmi $(docker images -a -q). You'll get warnings on ones that are in use, but it'll keep going.

Contributor

cpuguy83 commented Nov 10, 2014

I think dangling is only untagged images as well.
You should be able to just docker rmi $(docker images -a -q). You'll get warnings on ones that are in use, but it'll keep going.

@SamSaffron

This comment has been minimized.

Show comment
Hide comment
@SamSaffron

SamSaffron Nov 10, 2014

@cpuguy83 sort of, we do it but it feels risky, hoping for a warning-less solution.

@cpuguy83 sort of, we do it but it feels risky, hoping for a warning-less solution.

@schmunk42

This comment has been minimized.

Show comment
Hide comment
@schmunk42

schmunk42 Dec 2, 2014

Contributor

I am in a situation where I can't remove a certain layer, because docker claims it's a dependency of some other layers, but refused to remove it, because it's not there.

No running containers...

docker@boot2docker:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

Remove dangling...

docker@boot2docker:~$ docker rmi `docker images -q --filter "dangling=true"`
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
Error response from daemon: Conflict, cannot delete df775d9589ad because the container 96ecbcfa8996 is using it, use -f to force
Error response from daemon: Conflict, cannot delete 805adf3b3684 because the container 78395e180f12 is using it, use -f to force
[....]
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 20:12:45 Error: failed to remove one or more images

Check a failed ID:

docker@boot2docker:~$ docker history 3aabea57d0eb
IMAGE               CREATED             CREATED BY                                      SIZE
3aabea57d0eb        47 hours ago        /bin/sh -c #(nop) CMD [/root/run.sh]            0 B
313a977f724d        47 hours ago        /bin/sh -c #(nop) WORKDIR /app                  0 B
[...]
f6fab3b798be        3 weeks ago         /bin/sh -c #(nop) CMD [/bin/bash]               0 B
f10807909bc5        3 weeks ago         /bin/sh -c #(nop) ADD file:01b419e635eb6bec68   85.1 MB
511136ea3c5a        17 months ago                                                       0 B

Remove that one...

docker@boot2docker:~$ docker rmi 3aabea57d0eb
Error response from daemon: Conflict, cannot delete 3aabea57d0eb because the container eef630e62010 is using it, use -f to force
2014/12/02 20:13:36 Error: failed to remove one or more images

OK failed, check the dependency - it's not there?!

docker@boot2docker:~$ docker history eef630e62010
2014/12/02 20:13:44 Error response from daemon: No such id: eef630e62010

Force remove now...

docker@boot2docker:~$ docker rmi -f 3aabea57d0eb
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 20:13:54 Error: failed to remove one or more images

Force remove the dependency...

docker@boot2docker:~$ docker rmi -f fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
Error response from daemon: No such image: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 20:14:26 Error: failed to remove one or more images

Stuck here since the last both forced commands don't work.

Contributor

schmunk42 commented Dec 2, 2014

I am in a situation where I can't remove a certain layer, because docker claims it's a dependency of some other layers, but refused to remove it, because it's not there.

No running containers...

docker@boot2docker:~$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

Remove dangling...

docker@boot2docker:~$ docker rmi `docker images -q --filter "dangling=true"`
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
Error response from daemon: Conflict, cannot delete df775d9589ad because the container 96ecbcfa8996 is using it, use -f to force
Error response from daemon: Conflict, cannot delete 805adf3b3684 because the container 78395e180f12 is using it, use -f to force
[....]
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 20:12:45 Error: failed to remove one or more images

Check a failed ID:

docker@boot2docker:~$ docker history 3aabea57d0eb
IMAGE               CREATED             CREATED BY                                      SIZE
3aabea57d0eb        47 hours ago        /bin/sh -c #(nop) CMD [/root/run.sh]            0 B
313a977f724d        47 hours ago        /bin/sh -c #(nop) WORKDIR /app                  0 B
[...]
f6fab3b798be        3 weeks ago         /bin/sh -c #(nop) CMD [/bin/bash]               0 B
f10807909bc5        3 weeks ago         /bin/sh -c #(nop) ADD file:01b419e635eb6bec68   85.1 MB
511136ea3c5a        17 months ago                                                       0 B

Remove that one...

docker@boot2docker:~$ docker rmi 3aabea57d0eb
Error response from daemon: Conflict, cannot delete 3aabea57d0eb because the container eef630e62010 is using it, use -f to force
2014/12/02 20:13:36 Error: failed to remove one or more images

OK failed, check the dependency - it's not there?!

docker@boot2docker:~$ docker history eef630e62010
2014/12/02 20:13:44 Error response from daemon: No such id: eef630e62010

Force remove now...

docker@boot2docker:~$ docker rmi -f 3aabea57d0eb
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 20:13:54 Error: failed to remove one or more images

Force remove the dependency...

docker@boot2docker:~$ docker rmi -f fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
Error response from daemon: No such image: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 20:14:26 Error: failed to remove one or more images

Stuck here since the last both forced commands don't work.

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Dec 2, 2014

Contributor

@schmunk42 docker ps -a

eef630e62010 is a container, and you can't run history on it, since that's for images.

Contributor

cpuguy83 commented Dec 2, 2014

@schmunk42 docker ps -a

eef630e62010 is a container, and you can't run history on it, since that's for images.

@schmunk42

This comment has been minimized.

Show comment
Hide comment
@schmunk42

schmunk42 Dec 2, 2014

Contributor

Thanks, but I always get stuck on the image mentioned above fe56ae5aadc..., also when trying to remove other images by name or ID. But the image above is not in the history of the image.

Kraftbuch:~ tobias$ docker rmi -f e922b436aef0
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 23:02:48 Error: failed to remove one or more images
Kraftbuch:~ tobias$ docker history e922b436aef0
IMAGE               CREATED             CREATED BY                                      SIZE
e922b436aef0        5 weeks ago         /bin/sh -c #(nop) ONBUILD RUN /usr/local/bin/   0 B
965b44585eb1        5 weeks ago         /bin/sh -c #(nop) ONBUILD RUN /app/init --env   0 B
fd3d5cbb562f        5 weeks ago         /bin/sh -c #(nop) ONBUILD ADD . /app            0 B
81953b90b861        5 weeks ago         /bin/sh -c #(nop) WORKDIR /app                  0 B
cfec040ab3f7        5 weeks ago         /bin/sh -c /usr/local/bin/composer create-pro   42.52 MB
2b318ece4d05        5 weeks ago         /bin/sh -c /usr/local/bin/composer global req   5.006 MB
a4da701e254a        5 weeks ago         /bin/sh -c #(nop) ADD dir:e27c1d6e025b66c5f7d   219 B
61686e5d7c4a        5 weeks ago         /bin/sh -c curl -sS https://getcomposer.org/i   1.033 MB
ba1ec865d3fc        5 weeks ago         /bin/sh -c apt-get update &&     apt-get inst   228.8 MB
73807de8b9f3        5 weeks ago         /bin/sh -c #(nop) ENV DEBIAN_FRONTEND=noninte   0 B
417f2d590451        5 weeks ago         /bin/sh -c #(nop) MAINTAINER Tobias Munk <tob   0 B
61f7f4f722fb        6 weeks ago         /bin/sh -c #(nop) CMD [/bin/bash]               0 B
638fd9704285        6 weeks ago         /bin/sh -c #(nop) ADD file:c53beaefa2d28eee7f   85.1 MB
511136ea3c5a        17 months ago                                                       0 B
Contributor

schmunk42 commented Dec 2, 2014

Thanks, but I always get stuck on the image mentioned above fe56ae5aadc..., also when trying to remove other images by name or ID. But the image above is not in the history of the image.

Kraftbuch:~ tobias$ docker rmi -f e922b436aef0
Error response from daemon: No such id: fe56ae5aadc7f173427241454d728bdc917b0793ef7b331b02491b22658c6bfe
2014/12/02 23:02:48 Error: failed to remove one or more images
Kraftbuch:~ tobias$ docker history e922b436aef0
IMAGE               CREATED             CREATED BY                                      SIZE
e922b436aef0        5 weeks ago         /bin/sh -c #(nop) ONBUILD RUN /usr/local/bin/   0 B
965b44585eb1        5 weeks ago         /bin/sh -c #(nop) ONBUILD RUN /app/init --env   0 B
fd3d5cbb562f        5 weeks ago         /bin/sh -c #(nop) ONBUILD ADD . /app            0 B
81953b90b861        5 weeks ago         /bin/sh -c #(nop) WORKDIR /app                  0 B
cfec040ab3f7        5 weeks ago         /bin/sh -c /usr/local/bin/composer create-pro   42.52 MB
2b318ece4d05        5 weeks ago         /bin/sh -c /usr/local/bin/composer global req   5.006 MB
a4da701e254a        5 weeks ago         /bin/sh -c #(nop) ADD dir:e27c1d6e025b66c5f7d   219 B
61686e5d7c4a        5 weeks ago         /bin/sh -c curl -sS https://getcomposer.org/i   1.033 MB
ba1ec865d3fc        5 weeks ago         /bin/sh -c apt-get update &&     apt-get inst   228.8 MB
73807de8b9f3        5 weeks ago         /bin/sh -c #(nop) ENV DEBIAN_FRONTEND=noninte   0 B
417f2d590451        5 weeks ago         /bin/sh -c #(nop) MAINTAINER Tobias Munk <tob   0 B
61f7f4f722fb        6 weeks ago         /bin/sh -c #(nop) CMD [/bin/bash]               0 B
638fd9704285        6 weeks ago         /bin/sh -c #(nop) ADD file:c53beaefa2d28eee7f   85.1 MB
511136ea3c5a        17 months ago                                                       0 B
@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Dec 2, 2014

Member

@schmunk42 this sounds similar to #9056 (which was solve by #9204) and should be in the upcoming 1.4 release

Member

thaJeztah commented Dec 2, 2014

@schmunk42 this sounds similar to #9056 (which was solve by #9204) and should be in the upcoming 1.4 release

@schmunk42

This comment has been minimized.

Show comment
Hide comment
@schmunk42

schmunk42 Dec 2, 2014

Contributor

Yeah, looks the same.

PS: Is it possible to test master, I looked through the docs, but didn't find instructions on first sight.

Contributor

schmunk42 commented Dec 2, 2014

Yeah, looks the same.

PS: Is it possible to test master, I looked through the docs, but didn't find instructions on first sight.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Dec 3, 2014

Member

Yes, you can get master builds at https://master.dockerproject.com saves having to build yourself :)

Note that the master builds are not what will be in 1.4. To get those, look here #9345

Member

thaJeztah commented Dec 3, 2014

Yes, you can get master builds at https://master.dockerproject.com saves having to build yourself :)

Note that the master builds are not what will be in 1.4. To get those, look here #9345

@meirwah

This comment has been minimized.

Show comment
Hide comment
@meirwah

meirwah Jan 11, 2015

Hi,
what about the next approach...
Like the approach taken in the docker “compose”(fig) build a side project(not part of docker core)
that will handle the cleaning of unused images, according to the following logic:

  1. Remove all dangling images
  2. Get all containers running/stopped (docker ps -a)
  3. Fetch all images names from result
  4. Delete all used images (result of 3)

I know it is not perfect (I’m ignoring images dependencies) , but does it have some value?

Another thing we can add, is look at the events of past X time, parse from it all image names,
So you will delete only images not used in the past X time..
WDYT?

meirwah commented Jan 11, 2015

Hi,
what about the next approach...
Like the approach taken in the docker “compose”(fig) build a side project(not part of docker core)
that will handle the cleaning of unused images, according to the following logic:

  1. Remove all dangling images
  2. Get all containers running/stopped (docker ps -a)
  3. Fetch all images names from result
  4. Delete all used images (result of 3)

I know it is not perfect (I’m ignoring images dependencies) , but does it have some value?

Another thing we can add, is look at the events of past X time, parse from it all image names,
So you will delete only images not used in the past X time..
WDYT?

@luxas

This comment has been minimized.

Show comment
Hide comment
@luxas

luxas Jul 30, 2015

I suppose you mean that --unused should remove all images with no container.
That sounds good.

Then a --untagged or --no-repo option is also possible for removing all images with "" values in Repository and Tag.

How does that sound?
And who should work on this?

luxas commented Jul 30, 2015

I suppose you mean that --unused should remove all images with no container.
That sounds good.

Then a --untagged or --no-repo option is also possible for removing all images with "" values in Repository and Tag.

How does that sound?
And who should work on this?

@meirwah

This comment has been minimized.

Show comment
Hide comment
@meirwah

meirwah Aug 6, 2015

I was part of an effort to impl it as an external project in the end,
project is here (it's generic, not only for this use-case): https://github.com/CloudSlang/cloud-slang

you can see a short blog on that here : https://www.digitalocean.com/community/tutorials/how-to-clean-up-your-docker-environment-using-cloudslang-on-a-coreos-cluster-2

hope it helps...

meirwah commented Aug 6, 2015

I was part of an effort to impl it as an external project in the end,
project is here (it's generic, not only for this use-case): https://github.com/CloudSlang/cloud-slang

you can see a short blog on that here : https://www.digitalocean.com/community/tutorials/how-to-clean-up-your-docker-environment-using-cloudslang-on-a-coreos-cluster-2

hope it helps...

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Sep 15, 2015

Contributor

filters could be extended to support unused

Contributor

cpuguy83 commented Sep 15, 2015

filters could be extended to support unused

@wgerlach

This comment has been minimized.

Show comment
Hide comment
@wgerlach

wgerlach Sep 22, 2015

This is how I remove unused images, maybe it is of help to others:

#!/bin/bash

# this script requires bash version 4

#delete all stopped containers
docker rm $(docker ps -f status=exited -q)


# get list of (tagged) images that are used by running containers
declare -A usedimages
for i in $(docker ps | awk '{ print $2; }' | grep -v "^ID$") ; do ID=$(docker inspect  --format="{{.Id}}" $i) ; usedimages[$ID]=$i ; done

for i in "${!usedimages[@]}"
do
  echo "key  : $i"
  echo "value: ${usedimages[$i]}"
done


# delete all unused (tagged) images
for i in $(docker images --no-trunc -q | sort -u) 
  do
  if [[ ${usedimages[$i]}x != "x" ]] ; then
    echo "image is used: $i"
    echo "by ${usedimages[$i]}"
  else
    echo "image is not used: $i"
    docker rmi $i
  fi
done

This is how I remove unused images, maybe it is of help to others:

#!/bin/bash

# this script requires bash version 4

#delete all stopped containers
docker rm $(docker ps -f status=exited -q)


# get list of (tagged) images that are used by running containers
declare -A usedimages
for i in $(docker ps | awk '{ print $2; }' | grep -v "^ID$") ; do ID=$(docker inspect  --format="{{.Id}}" $i) ; usedimages[$ID]=$i ; done

for i in "${!usedimages[@]}"
do
  echo "key  : $i"
  echo "value: ${usedimages[$i]}"
done


# delete all unused (tagged) images
for i in $(docker images --no-trunc -q | sort -u) 
  do
  if [[ ${usedimages[$i]}x != "x" ]] ; then
    echo "image is used: $i"
    echo "by ${usedimages[$i]}"
  else
    echo "image is not used: $i"
    docker rmi $i
  fi
done
@wombat

This comment has been minimized.

Show comment
Hide comment
@wombat

wombat Nov 16, 2015

@wgerlach Thanks for the tip. Don´t you get an "value too great for base" error within the usedimages[$ID]=$i part?

wombat commented Nov 16, 2015

@wgerlach Thanks for the tip. Don´t you get an "value too great for base" error within the usedimages[$ID]=$i part?

@wgerlach

This comment has been minimized.

Show comment
Hide comment
@wgerlach

wgerlach Nov 16, 2015

@w0mbat Are you using bash v4 ?

@w0mbat Are you using bash v4 ?

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Dec 29, 2015

Member

@quyen91 please don't leave random comments on all issues that are slightly related, please read the discussion, and you'll see that alternatives are already mentioned. Also, this is not related to docker-machine

Member

thaJeztah commented Dec 29, 2015

@quyen91 please don't leave random comments on all issues that are slightly related, please read the discussion, and you'll see that alternatives are already mentioned. Also, this is not related to docker-machine

@quyen91

This comment has been minimized.

Show comment
Hide comment
@quyen91

quyen91 Dec 31, 2015

@thaJeztah i tried so many solution but not woking, this works for me so i only want share it.

quyen91 commented Dec 31, 2015

@thaJeztah i tried so many solution but not woking, this works for me so i only want share it.

@mickep76

This comment has been minimized.

Show comment
Hide comment
@mickep76

mickep76 Jan 13, 2016

I do it as follows based on the prev. rec. in the thread:

#!/bin/bash

log() {
    logger -s -t $(basename $0) $1
}

log "Started"

containers=$(docker ps -a -q -f "status=exited")
if [ -n "${containers}" ]; then
    log "Cleanup stopped container id(s): ${containers}"
    docker rm $containers
fi

images=$(docker images -q --filter "dangling=true")
if [ -n "${images}" ]; then
    log "Cleanup dangling image id(s): ${images}"
    docker rmi $images
fi

log "Done"

I do it as follows based on the prev. rec. in the thread:

#!/bin/bash

log() {
    logger -s -t $(basename $0) $1
}

log "Started"

containers=$(docker ps -a -q -f "status=exited")
if [ -n "${containers}" ]; then
    log "Cleanup stopped container id(s): ${containers}"
    docker rm $containers
fi

images=$(docker images -q --filter "dangling=true")
if [ -n "${images}" ]; then
    log "Cleanup dangling image id(s): ${images}"
    docker rmi $images
fi

log "Done"
@sammcj

This comment has been minimized.

Show comment
Hide comment
@sammcj

sammcj Feb 5, 2016

This would be very useful, after several years of running thousands of docker images since 2013 - cleaning up is still a massive pain in the ass, usually we find formatting the whole filesystem and pulling everything again is by far the easiest way but absolutely not ideal.

sammcj commented Feb 5, 2016

This would be very useful, after several years of running thousands of docker images since 2013 - cleaning up is still a massive pain in the ass, usually we find formatting the whole filesystem and pulling everything again is by far the easiest way but absolutely not ideal.

@schmunk42

This comment has been minimized.

Show comment
Hide comment
@schmunk42

schmunk42 Feb 5, 2016

Contributor

@sammcj Agreed. Especially for swarm, where nodes often pull images they don't use at all.

My two most used docker-docker-cleanup tools:

Contributor

schmunk42 commented Feb 5, 2016

@sammcj Agreed. Especially for swarm, where nodes often pull images they don't use at all.

My two most used docker-docker-cleanup tools:

@jimmycuadra

This comment has been minimized.

Show comment
Hide comment
@jimmycuadra

jimmycuadra Feb 5, 2016

Contributor

Possible inspiration: rkt has a "garbage collection" system that can be called from a cron job and clean stuff that hasn't been used for a while (with a configurable grace period): https://coreos.com/rkt/docs/latest/devel/pod-lifecycle.html

Contributor

jimmycuadra commented Feb 5, 2016

Possible inspiration: rkt has a "garbage collection" system that can be called from a cron job and clean stuff that hasn't been used for a while (with a configurable grace period): https://coreos.com/rkt/docs/latest/devel/pod-lifecycle.html

@csainty

This comment has been minimized.

Show comment
Hide comment
@csainty

csainty Feb 15, 2016

👍 for better tooling support here.

I use this command currently (in case anyone is interested)
docker rmi $(grep -xvf <(docker ps -a --format '{{.Image}}') <(docker images | tail -n +2 | grep -v '<none>' | awk '{ print $1":"$2 }'))

csainty commented Feb 15, 2016

👍 for better tooling support here.

I use this command currently (in case anyone is interested)
docker rmi $(grep -xvf <(docker ps -a --format '{{.Image}}') <(docker images | tail -n +2 | grep -v '<none>' | awk '{ print $1":"$2 }'))

@sungardas-cloud-devops

This comment has been minimized.

Show comment
Hide comment
@sungardas-cloud-devops

sungardas-cloud-devops Jun 23, 2016

I've gone a little deeper... Here is my 1-liner for removing containers which have not actively been used in more than 13 days:

docker images | grep -v REPOSITORY | awk \'{print $3}\' | xargs -n 1 docker history | grep -v missing | grep -v "^IMAGE" | egrep -v "day|hour|minute|second" | awk \'{print $1}\' | sort | uniq | xargs -n 1 docker inspect | jq -r .[0].RepoTags[] | xargs docker rmi

It DOES have a dependencies on the xargs and jq commands... My ideal solution would be a command something like:

docker rmi --last-used=-14

Meaning delete all images that have not actively been run in more than 14 days. Or perhaps:

docker rmi --last-used=<unix timestamp>

Which would delete all containers which haven't been used since the specified timestamp.

sungardas-cloud-devops commented Jun 23, 2016

I've gone a little deeper... Here is my 1-liner for removing containers which have not actively been used in more than 13 days:

docker images | grep -v REPOSITORY | awk \'{print $3}\' | xargs -n 1 docker history | grep -v missing | grep -v "^IMAGE" | egrep -v "day|hour|minute|second" | awk \'{print $1}\' | sort | uniq | xargs -n 1 docker inspect | jq -r .[0].RepoTags[] | xargs docker rmi

It DOES have a dependencies on the xargs and jq commands... My ideal solution would be a command something like:

docker rmi --last-used=-14

Meaning delete all images that have not actively been run in more than 14 days. Or perhaps:

docker rmi --last-used=<unix timestamp>

Which would delete all containers which haven't been used since the specified timestamp.

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Aug 5, 2016

Member

Relates to #22871

Member

thaJeztah commented Aug 5, 2016

Relates to #22871

@mlaventure mlaventure referenced this issue Sep 10, 2016

Merged

New Data Management commands #26108

2 of 2 tasks complete

@icecrime icecrime closed this in #26108 Oct 1, 2016

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Oct 1, 2016

Member

Data management features are merged in #26108. Note that it's the first incarnation; additional enhancements can be added in future.

Member

thaJeztah commented Oct 1, 2016

Data management features are merged in #26108. Note that it's the first incarnation; additional enhancements can be added in future.

@OlivierDupre

This comment has been minimized.

Show comment
Hide comment
@OlivierDupre

OlivierDupre Dec 22, 2016

@mickep76 I disagree with your solution. The first part of your script will remove data containers, which are basically in an "Exited" status but are needed.
Cf: https://docs.docker.com/engine/tutorials/dockervolumes/

@mickep76 I disagree with your solution. The first part of your script will remove data containers, which are basically in an "Exited" status but are needed.
Cf: https://docs.docker.com/engine/tutorials/dockervolumes/

@mickep76

This comment has been minimized.

Show comment
Hide comment
@mickep76

mickep76 Dec 22, 2016

You're right considering if you use data containers in a state that is not running. I believe the correct approach is what is proposed by @sungardas-cloud-devops --last-used=-14.

You're right considering if you use data containers in a state that is not running. I believe the correct approach is what is proposed by @sungardas-cloud-devops --last-used=-14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment