Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Switch from Arch to Alpine #249

Closed
EDM115 opened this issue Nov 16, 2023 · 4 comments
Closed

[FEATURE REQUEST] Switch from Arch to Alpine #249

EDM115 opened this issue Nov 16, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request Priority S

Comments

@EDM115
Copy link
Owner

EDM115 commented Nov 16, 2023

This would allow for a smaller image size (potentially from 2 Gb to 200 Mb)

Research to do :

  • Packages to use as replacement :
    • Arch's p7zip, repo
    • Alpine doesn't have bash by default
    • ffmpeg
    • gcc ? (mostly for building some pip deps)
    • python
    • zstd ? (do we keep support ?)
  • Get how their permission system work
A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/sevenzip/ AND https://sourceforge.net/projects/p7zip/). - p7zip-project/p7zip
Alpine packages build scripts
Alpine packages build scripts
Alpine packages build scripts
Alpine packages build scripts
@EDM115 EDM115 added the enhancement New feature or request label Nov 16, 2023
@EDM115 EDM115 self-assigned this Nov 16, 2023
@EDM115 EDM115 linked a pull request Jan 21, 2024 that will close this issue
@EDM115 EDM115 changed the title [FEATURE REQUEST] Reduce the size of the Docker image [FEATURE REQUEST] Switch from Arch to Alpine Nov 13, 2024

This comment was marked as resolved.

This comment was marked as duplicate.

@EDM115
Copy link
Owner Author

EDM115 commented Nov 14, 2024

first tests :

  • doesn't crash
  • we have to install the 7-zip package AND compile manually unrar (adds 60s for the build image step)
  • the image is around 400 Mb which is WAY MORE acceptable than the previous 2 Gb-ish
  • we can probably shrink it down even further
  • the code needs special case for rar extracting. although this would allow to finally handle .partX.rar files !
  • the upload is messed up currently but it's probably a skill issue introduced in be31292
…ossible

EDM115 added a commit that referenced this issue Nov 15, 2024
- renamed the module from `unzip` to `unzipbot` to avoid confusion. The `unzipbot` variable have been renamed to `unzipbot_client` in consequence
- uses python:3.12-alpine, correct deps, clones the right branch
- followup to #249 :
  - pzip have been replaced by 7zip
  - unrar have to be build by hand
  - this means we have some extra deps, also for some python deps
  - we could precompile them in another repo to remove deps such as g++, gcc, libffi-dev, make and musl-dev
  - the current image size is 530 MB which is a x4 improvement !
- added a unrar build script
- deletes 0B thumbnails caused by FILE_REFERENCE_EXPIRED. Also warns the user if such thing happens, going to automate the retrieval process later on
- special handling for rar files. splitted rars aren't handled yet. splitted zips and 7z (.001) still works
@EDM115
Copy link
Owner Author

EDM115 commented Nov 16, 2024

idea : create a container step where we just build unrar and the python deps
then we just copy them to the actual container and avoid bundling gcc, g++ and others, reducing the final image size

EDM115 added a commit that referenced this issue Nov 16, 2024
dependencies are built and installed on another container
the final image size shrinks from 530MB to only 294MB
closes #249, closes #286
@EDM115 EDM115 closed this as completed Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority S
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant