Skip to content

Commit

Permalink
fixes #105 - Fix arm64v8 archive extraction by using debian image
Browse files Browse the repository at this point in the history
- Doesn't work on alpine for arm64v8 so far so changed to debian image.
- To reduce image size, check if java is already installed then install
required version.
- removed used of pkill if not available, fallback to reboot.
  • Loading branch information
jaymoulin committed Feb 2, 2022
1 parent 1b5d46a commit e1a63ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ build: qemu-arm-static qemu-aarch64-static
image=bellsoft\\/liberica-openjdk-alpine:10.0.2-armv7l; \
else \
archi=arm64; \
image=bellsoft\\/liberica-openjdk-alpine:10.0.2-aarch64; \
image=bellsoft\\/liberica-openjdk-debian:11.0.12-aarch64; \
FILE=debian.Dockerfile; \
fi; \
cat $$FILE | sed "s/FROM openjdk:jre-alpine/FROM $$image/g" > .Dockerfile; \
docker build -t jaymoulin/jdownloader:${VERSION}-$(arch) -f .Dockerfile --build-arg ARCH=$${archi} ${CACHE} --build-arg VERSION=${VERSION} .;\
Expand Down
2 changes: 1 addition & 1 deletion configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ fi

sed -Ei "s/\"password\" : .+\"(,?)/\"password\" : \"$2\"\1/" /opt/JDownloader/app/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json && \
sed -Ei "s/\"email\" : .+\"(,?)/\"email\" : \"$1\"\1/" /opt/JDownloader/app/cfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json
pkill -f "JDownloader"
(pkill -f "JDownloader" || reboot)
3 changes: 2 additions & 1 deletion debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ ENV XDG_DOWNLOAD_DIR=/opt/JDownloader/Downloads
# which is compiled against libstdc++
RUN mkdir -p /opt/JDownloader/app/ && \
apt-get update && \
apt-get install openjdk-8-jre ffmpeg wget -y && \
apt-get install ffmpeg wget -y && \
(java -version || apt-get install openjdk-8-jre) && \
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && \
chmod 777 /opt/JDownloader/ -R && \
apt-get autoremove -y wget && \
Expand Down

0 comments on commit e1a63ae

Please sign in to comment.