Skip to content

Commit

Permalink
fixes #22 - add arm32v6 support
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Apr 4, 2019
1 parent bfca91a commit 00ba06f
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ If you find this useful, please consider starring the repo and/or donating.
People showing interest attract more attention ;)
-->

**Output of `docker inspect jdownloader --format='{{index .Config.Labels.version}}'`:**

```
(paste your output here)
```

**Description**

<!--
Expand Down Expand Up @@ -46,9 +52,3 @@ Briefly describe the problem you are having in a few paragraphs.
(paste logs)
</pre>
</details>

**Output of `docker inspect jdownloader --format='{{index .Config.Labels.version}}'`:**

```
(paste your output here)
```
33 changes: 33 additions & 0 deletions Dockerfile.arm32v6
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM balenalib/raspberry-pi as builder

COPY qemu-arm-static /usr/bin/

FROM builder

ARG ARCH=armel
ARG VERSION="0.7.0"
LABEL maintainer="Jay MOULIN <[email protected]> <https://twitter.com/MoulinJay>"
LABEL version="${VERSION}-${ARCH}"

COPY ./${ARCH}/*.jar /opt/JDownloader/libs/
# archive extraction uses sevenzipjbinding library
# which is compiled against libstdc++
RUN mkdir -p /opt/JDownloader/ && \
apt update && \
apt install openjdk-8-jre ffmpeg wget -y && \
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && \
chmod +x /opt/JDownloader/JDownloader.jar && \
wget -O /usr/bin/tini "https://github.com/krallin/tini/releases/download/v0.18.0/tini-static-${ARCH}" --no-check-certificate && \
chmod +x /usr/bin/tini && \
chmod 777 /opt/JDownloader/ -R && \
apt autoremove -y wget && \
rm /usr/bin/qemu-*-static


COPY daemon.sh /opt/JDownloader/
COPY default-config.json.dist /opt/JDownloader/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.dist
COPY configure.sh /usr/bin/configure

WORKDIR /opt/JDownloader

CMD ["tini", "--", "/opt/JDownloader/daemon.sh"]
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION ?= 0.7.0
CACHE ?= --no-cache=1
FULLVERSION ?= ${VERSION}
archs ?= amd64 armhf arm64v8 i386
archs ?= amd64 arm32v6 armhf arm64v8 i386

.PHONY: all build publish latest
all: build publish latest
Expand All @@ -11,17 +11,21 @@ qemu-aarch64-static:
cp /usr/bin/qemu-aarch64-static .
build: qemu-arm-static qemu-aarch64-static
$(foreach arch,$(archs), \
FILE=Dockerfile; \
if [ $(arch) = armhf ]; \
then archi=armhf; \
image=jaymoulin\\/oracle-jdk:armhf; \
elif [ $(arch) = arm64v8 ]; \
then archi=arm64; \
image=${arch}\\/openjdk:jre-alpine; \
elif [ $(arch) = arm32v6 ]; \
then archi=armel; \
FILE=Dockerfile.arm32v6; \
else \
archi=$(arch); \
image=${arch}\\/openjdk:jre-alpine; \
fi; \
cat Dockerfile | sed "s/FROM openjdk:jre-alpine/FROM $$image/g" > .Dockerfile; \
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} .;\
)
publish:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ You can replace `~/Downloads` with the folder you want your downloaded files to
It is recommended to add `-v ~/jdownloader/cfg:/opt/JDownloader/cfg` to your command to save all your configurations.
Note: Use the `-u $(id -u):$(id -g)` part for jdownloader to run as a specific user. It's recommanded to use static values (see: https://docs.docker.com/engine/reference/commandline/exec/#options)

*Note for RPI Zero* : specify that you want the arm32v6 image (e.g. jaymoulin/jdownloader:0.7.0-arm32v6) because rpi zero identify itself as armhf which is wrong.

Configuration
---

Expand Down
Binary file added armel/sevenzipjbinding1509.jar
Binary file not shown.
Binary file added armel/sevenzipjbinding1509LinuxArmVersion.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
image: jaymoulin/jdownloader:$FULLVERSION
manifests:
- image: jaymoulin/jdownloader:$VERSION-arm32v6
platform:
architecture: arm
variant: v6
os: linux
-
image: jaymoulin/jdownloader:$VERSION-armhf
platform:
Expand Down

0 comments on commit 00ba06f

Please sign in to comment.