{"action":"created","issue":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/118","repository_url":"https://api.github.com/repos/aws/amazon-ecs-agent","labels_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/118/comments","events_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/118/events","html_url":"https://github.com/aws/amazon-ecs-agent/issues/118","id":89403582,"number":118,"title":"Image Removal","user":{"login":"JasonSwindle","id":1776251,"avatar_url":"https://avatars.githubusercontent.com/u/1776251?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonSwindle","html_url":"https://github.com/JasonSwindle","followers_url":"https://api.github.com/users/JasonSwindle/followers","following_url":"https://api.github.com/users/JasonSwindle/following{/other_user}","gists_url":"https://api.github.com/users/JasonSwindle/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonSwindle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonSwindle/subscriptions","organizations_url":"https://api.github.com/users/JasonSwindle/orgs","repos_url":"https://api.github.com/users/JasonSwindle/repos","events_url":"https://api.github.com/users/JasonSwindle/events{/privacy}","received_events_url":"https://api.github.com/users/JasonSwindle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-06-18T21:34:10Z","updated_at":"2016-05-27T18:03:51Z","closed_at":null,"body":"Howdy,\r\n\r\nCurrently the ECS-Agent does not remove old, un-used Docker Images.  Over time, this could cause issues with space."},"comment":{"url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/comments/222214444","html_url":"https://github.com/aws/amazon-ecs-agent/issues/118#issuecomment-222214444","issue_url":"https://api.github.com/repos/aws/amazon-ecs-agent/issues/118","id":222214444,"user":{"login":"AustinMaddox","id":961446,"avatar_url":"https://avatars.githubusercontent.com/u/961446?v=3","gravatar_id":"","url":"https://api.github.com/users/AustinMaddox","html_url":"https://github.com/AustinMaddox","followers_url":"https://api.github.com/users/AustinMaddox/followers","following_url":"https://api.github.com/users/AustinMaddox/following{/other_user}","gists_url":"https://api.github.com/users/AustinMaddox/gists{/gist_id}","starred_url":"https://api.github.com/users/AustinMaddox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AustinMaddox/subscriptions","organizations_url":"https://api.github.com/users/AustinMaddox/orgs","repos_url":"https://api.github.com/users/AustinMaddox/repos","events_url":"https://api.github.com/users/AustinMaddox/events{/privacy}","received_events_url":"https://api.github.com/users/AustinMaddox/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T18:03:50Z","updated_at":"2016-05-27T18:03:50Z","body":"The approach @ashramsey suggested is great, thanks for that. :smile:\r\n\r\nI only have one complaint... running `docker images -q | xargs --no-run-if-empty docker rmi` removes all the REPOSITORY and TAG information from my images. Is there a way to prevent that from happening?\r\n\r\n#### Before...\r\n```shell\r\n[ec2-user@ip-10-0-16-139 ~]$ docker images\r\nREPOSITORY                     TAG                 IMAGE ID            CREATED             VIRTUAL SIZE\r\nwpsinc/novus-acp-laravel       v154                6a0b28834462        2 hours ago         521.9 MB\r\nwpsinc/novus-api-laravel       v873                c3a30f0e4cfc        24 hours ago        558.9 MB\r\nwpsinc/ad-map-laravel          v34                 2dc593b48671        45 hours ago        519.8 MB\r\nwpsinc/alchemy-laravel         v724                49bf5abfe00e        46 hours ago        552.1 MB\r\nwpsinc/hdtwin-laravel          v100                0e0f0752ed23        47 hours ago        533.6 MB\r\nwpsinc/gmaxhelmet-legacy       v23                 e33f091fc1eb        8 days ago          404.9 MB\r\nwpsinc/subsidiaries-drupal     v200                2cfe5ec45292        10 days ago         647.8 MB\r\nwpsinc/calypso-laravel         v87                 08800bf41a49        10 days ago         526.4 MB\r\nwpsinc/gmaxhelmet-apache-php   latest              5ed9e4e3d425        10 days ago         541.5 MB\r\nwpsinc/hdtwin-php-fpm          latest              3f6db539e3b0        2 weeks ago         518.7 MB\r\n```\r\n\r\n#### Then I run...\r\n```shell\r\n[ec2-user@ip-10-0-16-139 ~]$ docker images -q | xargs --no-run-if-empty docker rmi\r\n```\r\nThis works great and removes any unused images. The problem is the images that **are** used by running containers have their info stripped from them.\r\n#### After...\r\n```shell\r\n[ec2-user@ip-10-0-16-139 ~]$ docker images\r\nREPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE\r\n<none>              <none>              6a0b28834462        2 hours ago         521.9 MB\r\n<none>              <none>              c3a30f0e4cfc        24 hours ago        558.9 MB\r\n<none>              <none>              2dc593b48671        45 hours ago        519.8 MB\r\n<none>              <none>              49bf5abfe00e        46 hours ago        552.1 MB\r\n<none>              <none>              0e0f0752ed23        47 hours ago        533.6 MB\r\n<none>              <none>              e33f091fc1eb        8 days ago          404.9 MB\r\n<none>              <none>              2cfe5ec45292        10 days ago         647.8 MB\r\n<none>              <none>              08800bf41a49        10 days ago         526.4 MB\r\n<none>              <none>              5ed9e4e3d425        10 days ago         541.5 MB\r\n<none>              <none>              3f6db539e3b0        2 weeks ago         518.7 MB\r\n```\r\n\r\nOf course, the ideal solution would be if there were ECS settings we could configure to remove old unused Docker images at a specified frequency or certain rules we could set up. :+1: "}}
{"actor":{"display_login":"AustinMaddox"}}