xthursdayx / yacreaderlibrary-server-docker

Docker image running a headless version of YACReaderLibraryServer 📦

Home Page:https://hub.docker.com/r/xthursdayx/yacreaderlibrary-server-docker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Discussion] alpine and more platform

F-TD5X opened this issue · comments

Well, you are not open the discussion tab in this repo, so I can only use this way to open a discussion.

The reason why I want an alpine version is it is so small. You can check my build in DockerHub, the alpine version is just about 50 MB.

And my Dockerfile is in my repo

At the same time, for users using some headless server like raspberry pi or something same. It was nice to build an image with multi-platform support. This also can be viewed in my DockerHub, I build an image tagged as edge with 5 platform support. T

The way I archive this is using docker buildx in the GitHub workflow file.

For I'm not familiar with GitHub workflow, I think I'd better not create a PR here.

Hi @F-TD5X I've actually never seen a repository with a discussion tab and didn't even realize it was an option, so I didn't intentionally choose not to open it.

Anyway, I've actually been working on this same thing - a smaller alpine or debian-slim multi-arch docker image where the nd user can choose the backend compression -either p7zip or unarr, and which would run YACReaderLibraryServre as a non-root user ( which I feel is important for security. I've made a lot of progress with this in that I have a already created two debian-slim-based images that run unarr and p7zip alternatively that both work perfectly and build as multi-arch images (via a Github Workflow). The only issue I've run into is getting the workflow to properly generate a docker manifest that correctly tags the p7zip vs unarr images correctly and then link the multiple arch versions of the same image together into one group (whether that something like yacserver:pzip-v1.0.1. yacserere:unarr-v1.0.1 or uacservere:latest (which, based on my setting should default to unarr). .

I've been really busy with work so haven't had a chance to finalize it, but hope to get to it soon. I'll take a look at your Dockerfile and see how it compares to the one I've been working on, but I'm also open to hearing any suggestions and advice. So feel free to contintribue, whether here through suggestions, or via PRs.

I worked on it a lot more changes on my local copy since I last pushed to GH (swapped to a Debian-slim base, removed unnecessary packages and launch the app using yasu to drop user privileges), but you can see the direction I was heading in this repo: https://github.com/xthursdayx/yacreaderlibrary-server-docker-dev

@xthursdayx Hi, I think the better way to make a multi-arch docker image is using docker buildx to build some arch together. You may have seen this while you are looking for usage of the manifest. This way only needs one Dockerfile and a couple of build commands. But it is not supported by DokcerHub auto-build, the GitHub Action build is required.

To make a slim image, I think it's better to use some distro using busybox like alpine, we don't need any kernel feature, systemed or something big but not useful.

And another way is to ship the image only with the libs it must have. Using ldd and patchelf may help, but the QT library is way too big. Maybe we can also strip them, I'll have it a try later.

For specific use non-root users we can just start the container by docker run --user nobody or docker run --user 65535, just start with suitable mount points.

Yeah, I think that is where we need to head anyway, since Dockerhub no long supports autobuild for non-enterprise clients anyway.

I'm open to an Alpine-base over Debian-slim (though it's not much bigger), and I take your point about not needing kernel features or system.d. As you say, it could be possible to make a custom "from scratch" image with just the necessary libs, but that's not something I think I have the skills to attempt current. I'm going to keep playing with it, but I'm happy to see what you come up with and discuss the best possible image.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.