Suwayomi / docker-tachidesk

Run Suwayomi-Server in a docker container
Mozilla Public License 2.0
224 stars 56 forks source link

New base image #25

Closed Syer10 closed 1 year ago

Syer10 commented 1 year ago

Use eclipse-temurin:11-jre as the new base image instead of alpine.

Alpine will be avalible as a suffix to the normal tags. It would be a backup for people who are on platforms that Temurin does not support, such as x32 and Arm V6.

Effective changes:

I will see if I can get this tested before unmarking this as a draft.

arbuilder commented 1 year ago

@Syer10 Only issue would be switching default (latest tag) as it would break for people who are currently using that tag across diff os and platforms. If it would not cause an issue we could use reuse current java 11 tag for eclipse-temurin:11-jre ?

Syer10 commented 1 year ago

I would prefer not to have latest as alpine because it only supports old Java runtimes, and I want it to be future-proof, as there is a chance we will bump the required Java to 11 eventually.

I stopped working on this PR because I couldnt figure out permissions, it uses Ubuntu as the base but nothing I could find worked with allowing Tachidesk to create files and such.

arbuilder commented 1 year ago

I would prefer not to have latest as alpine because it only supports old Java runtimes, and I want it to be future-proof, as there is a chance we will bump the required Java to 11 eventually.

I see if we would be moving from java 8 then we can switch.

I stopped working on this PR because I couldnt figure out permissions, it uses Ubuntu as the base but nothing I could find worked with allowing Tachidesk to create files and such.

If u r still interested in this let me know what permissions issues are there, i might be able to help.

Syer10 commented 1 year ago

The number 1 issue was that Tachidesk was not able to create any files, it shouts permission errors the whole time. This is the line where it creates the user for Tachidesk to use, I have tried multiple variations of this and it just continues to error.

arbuilder commented 1 year ago

The number 1 issue was that Tachidesk was not able to create any files, it shouts permission errors the whole time. This is the line where it creates the user for Tachidesk to use, I have tried multiple variations of this and it just continues to error.

for ubuntu use like below, i was able to test and run tachidesk with this

FROM eclipse-temurin:11-jre-focal

RUN groupadd -g 1000 suwayomi && adduser --gecos "" --disabled-password suwayomi --uid 1000 --gid 1000;

RUN mkdir -p /home/suwayomi && chown -R suwayomi:suwayomi /home/suwayomi

USER suwayomi

WORKDIR /home/suwayomi

RUN curl -s --create-dirs -L https://raw.githubusercontent.com/suwayomi/docker-tachidesk/main/scripts/startup_script.sh -o /home/suwayomi/startup/startup_script.sh

RUN curl -L $(curl -s https://api.github.com/repos/suwayomi/tachidesk-server/releases/latest | grep -o "https.*jar") -o /home/suwayomi/startup/tachidesk_latest.jar

EXPOSE 4567

CMD ["/bin/sh", "/home/suwayomi/startup/startup_script.sh"]

OR this

FROM eclipse-temurin:11-jre-focal

RUN groupadd -g 1000 suwayomi && useradd --create-home --no-log-init -u 1000 -g 1000 suwayomi;

USER suwayomi

WORKDIR /home/suwayomi

RUN curl -s --create-dirs -L https://raw.githubusercontent.com/suwayomi/docker-tachidesk/main/scripts/startup_script.sh -o /home/suwayomi/startup/startup_script.sh

RUN curl -L $(curl -s https://api.github.com/repos/suwayomi/tachidesk-server/releases/latest | grep -o "https.*jar") -o /home/suwayomi/startup/tachidesk_latest.jar

EXPOSE 4567

CMD ["/bin/sh", "/home/suwayomi/startup/startup_script.sh"]
Syer10 commented 1 year ago

I added the changes from the first codeblock to the PR, the second looks useful but it would break the legacy alpine images since it removes the mkdir command. I think it's ready for review so I'll unmark it as draft 👍 .