Docker image grows in size after server upload via webui

Summary

Crafty defaults to uploading files from the server creation tab to /crafty/imports (when running in Docker) This path is not mapped anywhere by default, so the uploaded files get written to the docker image. The image can grow very large due to that. The path /crafty/imports is configured to be cleaned periodically, but due to some specific configuration in Unraid the docker images are saved in a mother image that is limited in size. This can lead to corrupted uploads. This Change fixes a flaw that could break the import if the files uploaded exceed the empty space in the v-disk.

Area of the system

Server creation via Zip upload function

How does this currently work?

The uploaded files are put into /crafty/imports, which is a docker internal path

What is the desired way of working?

All uploaded files can be uploaded into a subdirectory of the /crafty/import directory, which is already mapped to a storage location.

Files can be uploaded to /crafty/import/upload. Which also get pruned periodically, but is not restricted by any v-disk size limitations.

This ensures backwards compatibility for all users with Docker, as the path /crafty/import should already be mapped.

Things to consider

If the /crafty/import/upload directory does not exist on the mapping (either by a user deleting it or it being not configured there) the uploads to the directory might fail (untested)

Edit: the upload does not fail, even if the user deletes the /crafty/import/upload directory from their mapping in Unraid. (and does not restart the container after that)

Priority/Severity

  • High (This will bring a huge increase in performance/productivity/usability)
  • Medium (This will bring a good increase in performance/productivity/usability)
  • Low (anything else e.g., trivial, minor improvements)

Current workaround

Re pulling the image for crafty clears the paths of the Docker container so that nothing in the image persists (uploaded files get removed from the /crafty/imports directory)

Edited by Freddy 0