brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: use Previous Apps to bring back every container after deleting docker.img

Docker
~/tips/tip-unraid-previous-apps-reinstall

Apps > Previous Apps > tick the ones you want > Install

Reinstalls all your old Docker containers with their saved settings after you recreate docker.img.

Deleting the Docker image sounds like losing all your containers. It is less dramatic than that, and I like how Unraid handles it.

Unraid saves each container’s settings as a template XML file on the boot device, in /boot/config/plugins/dockerMan/templates-user. Your actual app data sits in appdata, not in the image. So when docker.img is corrupted or has to be recreated, the container definitions are still there.

Apps > Previous Apps > tick the ones you want > Install

The Previous Apps filter in Community Applications lists them. Select what you want back and Unraid reinstalls it with your saved settings. The Unraid update page describes the same route after a Docker image rebuild: stop the Docker service in Settings, tick the delete box, restart Docker, then reinstall from Previous Apps.

This is why I keep container paths under appdata and never inside the container. The docs call that best practice.

The caveat: a template only describes the container. If a container stored data in a path you did not map, that data is gone with the image. Check the volume mappings before you delete anything.

Further reading: Unraid docs: Community Applications, Unraid docs: Updating Unraid, On this site: find what is filling your Unraid docker.img, On this site: Docker data-root can be a directory instead of a docker.img vDisk

More Docker tips ONBUILD RUN /usr/local/bin/python-build --dir /app/src SHELL ["/bin/bash", "-c"] docker commit <container> myname/testimage:version3 docker import /path/to/exampleimage.tgz docker compose events All Docker tips (192) All topics

Link