July 29, 20169 yr I need to shrink my docker image down smaller as it is way larger than it needs to be. I usually take a screenshot of my docker container mappings and re-download every container and manually map all the drives through the gui using the webGUI. Is there a better way to do this? It just takes a while since I have quite a few containers. It would be a nice plugin to have; Saves your docker container settingsg, deletes the image, reinstalls all the containers with the old settings but with a new image size you can specify. Thanks!
July 29, 20169 yr Install Community Apps plugin. disable docker delete docker.img recreate docker.img at whatever size you need/require start docker go to CA > previous apps reinstall aps - with all previous mappings/settings intact - it will re download the containers and use old settings Myk
July 29, 20169 yr Author Install Community Apps plugin. disable docker delete docker.img recreate docker.img at whatever size you need/require start docker go to CA > previous apps reinstall aps - with all previous mappings/settings intact - it will re download the containers and use old settings Myk I did look at that last time, but I seem to remember something not working. I'll try it during server maintenance this weekend. Thanks!
July 29, 20169 yr I do this all the time when I screw something up and it puts data in my Docker.img file. Sent from my SM-G920V using Tapatalk
July 29, 20169 yr The trick to it is as you need to delete the docker.img file first before restarting the docker service. This way the file is recreated from scratch as all your Docker mapping and container settings are stored on your flash drive. The community apps plug-in sees them and will reinstall them with previous settings Sent from my SM-G920V using Tapatalk
July 30, 20169 yr I do this all the time when I screw something up and it puts data in my Docker.img file. Myk,that's a fantastic quote to use when you're trying to get someone to believe you! But yeah, you are right, it's exactly what works.
July 30, 20169 yr Some of the images that devs are creating are far to fat, created just to get the app up, running and published quickly. Gig size images are totally unacceptable imho Lean images should be around 100meg max. app + compiled dependencies - done root@nas:~# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE shaf/munin-server latest 913e82b228d4 9 hours ago 271.6 MB shaf/munin-node latest a535c8da9a7a 25 hours ago 168 MB gitlab/gitlab-ce latest 0ae684b25ee6 2 days ago 1.155 GB ubuntu xenial bb4eabee84bf 7 days ago 124.8 MB ubuntu trusty 87d8afb341b5 7 days ago 187.9 MB google/cadvisor latest 5b2abc8d59d8 11 weeks ago 48.2 MB aptalca/docker-dolphin latest 582777d0cf32 14 months ago 970.3 MB
July 30, 20169 yr Clear some bloated images as follows root@nas:~# docker rmi gitlab/gitlab-ce Untagged: gitlab/gitlab-ce:latest Deleted: 0ae684b25ee696d840c6813e9d89403e5f9eaaa523c33ad0a82e41f0509029c6 Deleted: 1fe68a6dad75bd0f86a668a84c544d822cccbb62a79e3550ab9e961ae17c7d84 Deleted: e7644e99dd41a64a15e6294bc7b64d485c4c72f9adbf12a892e763c6a2ef1d7c Deleted: dea88183ea97166135b43e55300bcd59cab07fc89a49997dc06d8c53e6081955 Deleted: 091fb344162143d270064437cc133eafd5cc2dee97e8cce4c8be2806069169a7 Deleted: 92e22a0e4f03afc763c81eeda40cebe722dfcb929288c7cef6ed3b8166d46417 Deleted: 514000884a11b79078d405ce3623b9033391b39cadb4997c6bf670da43e55c22 Deleted: 847e1c4c583a21b4382ef5d50c2a10e42ac6d650e067cf05379ee5c4534bc8d3 Deleted: 75afb15a0f07e46535b68fd9755189131e6fe3ba380e1f9d3eb41328418cb8d6 Deleted: 0294f139642d292210f82038fe3fd3acbf6a9cd0a3228676bead8b3057dd1d45 Deleted: d86cd0e54bf97d34557dcb317a617322b6c8666f87766986c93343af19608b21 Deleted: 104cd76ea54348e6b6fad9ea3b4d8b3d0bf9056648710b9596b5c2737f0b8884 root@nas:~# df -m /dev/loop0 Filesystem 1M-blocks Used Available Use% Mounted on /dev/loop0 10240 3131 5574 36% /var/lib/docker root@nas:~# /etc/rc.d/rc.docker stop stopping docker ... 3308d2944930 unmounting docker loopback root@nas:~# /etc/rc.d/rc.docker start Resize '/var/lib/docker' of 'max' starting docker ... munin-server: started succesfully! root@nas:~# df -m /dev/loop0 Filesystem 1M-blocks Used Available Use% Mounted on /dev/loop0 10240 1947 6539 23% /var/lib/docker
July 30, 20169 yr Some of the images that devs are creating are far to fat, created just to get the app up, running and published quickly. Gig size images are totally unacceptable imho Lean images should be around 100meg max. app + compiled dependencies - done root@nas:~# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE shaf/munin-server latest 913e82b228d4 9 hours ago 271.6 MB shaf/munin-node latest a535c8da9a7a 25 hours ago 168 MB gitlab/gitlab-ce latest 0ae684b25ee6 2 days ago 1.155 GB ubuntu xenial bb4eabee84bf 7 days ago 124.8 MB ubuntu trusty 87d8afb341b5 7 days ago 187.9 MB google/cadvisor latest 5b2abc8d59d8 11 weeks ago 48.2 MB aptalca/docker-dolphin latest 582777d0cf32 14 months ago 970.3 MB I think that's a bit harsh, especially for dolphin that is a VNC type container. It's a bit much to criticise other members work, like aptalca, who have done a lot for this docker community without showing that you can do it better imho. I look forward to seeing the 100MB VNC Dolphin container you are going to put out for everyone to use. Furthermore, what has this got to do with the OP? He's actually looking to shrink his docker.img, so clearly he hasn't got a problem with devs creating containers that are far too fat.
July 30, 20169 yr I think that's a bit harsh, especially for dolphin that is a VNC type container. It's a bit much to criticise other members work, like aptalca, who have done a lot for this docker community without showing that you can do it better imho. I look forward to seeing the 100MB VNC Dolphin container you are going to put out for everyone to use. Crikey ! I wasn't criticising ! Even my docker is far too fat, just pointing out that we're all (not just here but globally) taking shortcuts hence the large docker sizes. It takes time making slim dockers especially with nasty dependencies to take into consideration
July 30, 20169 yr I think that's a bit harsh, especially for dolphin that is a VNC type container. It's a bit much to criticise other members work, like aptalca, who have done a lot for this docker community without showing that you can do it better imho. I look forward to seeing the 100MB VNC Dolphin container you are going to put out for everyone to use. Crikey ! I wasn't criticising ! Even my docker is far too fat, just pointing out that we're all (not just here but globally) taking shortcuts hence the large docker sizes. It takes time making slim dockers especially with nasty dependencies to take into consideration Fair enough, but listing a load of large containers, including one by a very active docker dev on here, who tirelessly supports his stuff, and implying it's lazy, isn't the best way to integrate into a new community.
July 30, 20169 yr I think that's a bit harsh, especially for dolphin that is a VNC type container. It's a bit much to criticise other members work, like aptalca, who have done a lot for this docker community without showing that you can do it better imho. I look forward to seeing the 100MB VNC Dolphin container you are going to put out for everyone to use. Crikey ! I wasn't criticising ! Even my docker is far too fat, just pointing out that we're all (not just here but globally) taking shortcuts hence the large docker sizes. It takes time making slim dockers especially with nasty dependencies to take into consideration Fair enough, but listing a load of large containers, including one by a very active docker dev on here, who tirelessly supports his stuff, and implying it's lazy, isn't the best way to integrate into a new community. Good thing he's not running Kodi-headless at 876Meg otherwise we'd have a war on our hands Memory is cheap.
July 30, 20169 yr Good thing he's not running Kodi-headless at 876Meg otherwise we'd have a war on our hands Memory is cheap. LOL You guys !!! Challenge accepted : Forked as I actually need kodi-headless myself. Have a great day and sorry if I caused offence, honestly none was intended
July 30, 20169 yr LOL You guys !!! Challenge accepted : Forked as I actually need kodi-headless myself. You're playing with fire here..... Just sayin.....
July 30, 20169 yr Author Lol wow guys. Thanks for the help. I'll let you know what happens. I had a... Leaking? Container or something at some point that would gradually max out my image no matter what I did. So at come point I made it 40GB and now I only need like 15GB max. Sent from my SM-N910V using Tapatalk
July 30, 20169 yr Good thing he's not running Kodi-headless at 876Meg otherwise we'd have a war on our hands Memory is cheap. LOL You guys !!! Challenge accepted : Forked as I actually need kodi-headless myself. Have a great day and sorry if I caused offence, honestly none was intended sparklyballs/alpine-kodi latest 2c86ac26253e 4 weeks ago 210.8 MB
July 30, 20169 yr sparklyballs/alpine-kodi latest 2c86ac26253e 4 weeks ago 210.8 MB Thank you sir - much like !
July 30, 20169 yr Good thing he's not running Kodi-headless at 876Meg otherwise we'd have a war on our hands [emoji14] Memory is cheap. LOL You guys !!! Challenge accepted : Forked as I actually need kodi-headless myself. Have a great day and sorry if I caused offence, honestly none was intended sparklyballs/alpine-kodi latest 2c86ac26253e 4 weeks ago 210.8 MB Development containers don't count. Lol Sent from my LG-D852 using Tapatalk
July 31, 20169 yr Author UPDATE: Thanks everyone. CA plugin was able to reinstall everything other then my plexrequests container, which I have installed through the CLI, but I got that manually. I decreased it to 15GB, but now only 6GB is used .
Archived
This topic is now archived and is closed to further replies.