Skip to content

Commit 1e24ba1

Browse files
committed
Moved from manifest to buildx
1 parent c9eba4c commit 1e24ba1

17 files changed

+44
-136
lines changed

.github/workflows/main.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
1515
- name: Installing dependencies
1616
run: |
1717
sudo apt update && sudo apt install make -y
18-
git clone https://github.com/estesp/manifest-tool && cd manifest-tool && git checkout v0.9.0 && sudo make && sudo make install && cd .. && rm -Rf manifest-tool
19-
docker run --rm --privileged multiarch/qemu-user-static:register
20-
sudo apt install -y qemu qemu-user-static qemu-user binfmt-support
2118
echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_LOGIN }}" --password-stdin
22-
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
19+
- name: install buildx
20+
id: buildx
21+
uses: crazy-max/ghaction-docker-buildx@v1
2322
- name: Build image
2423
run: make build
2524
- name: Publish image
26-
run: make publish latest
25+
run: make publish

.gitignore

-3
This file was deleted.

Dockerfile

+21-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
FROM openjdk:jre-alpine as builder
1+
FROM bellsoft/liberica-openjdk-alpine:10.0.2-x86_64 as base-amd64-v1
2+
FROM bellsoft/liberica-openjdk-alpine:10.0.2-armv7l as base-arm-v7
23

3-
COPY qemu-aarch64-static /usr/bin/
4-
COPY qemu-arm-static /usr/bin/
4+
FROM bellsoft/liberica-openjdk-debian:11.0.20-aarch64 as base-arm64-v1
5+
ENV ISDEB=1
6+
FROM balenalib/raspberry-pi as base-arm-v6
7+
ENV ISDEB=1
58

6-
FROM builder
9+
FROM base-${TARGETARCH}-${TARGETVARIANT:-v1}
710

8-
ARG ARCH=armhf
911
ARG VERSION="2.1.2"
1012
LABEL maintainer="Jay MOULIN <https://brands.jaymoulin.me/me/docker-jdownloader>"
11-
LABEL version="${VERSION}-${ARCH}"
13+
LABEL version="${VERSION}-${TARGETPLATFORM}"
1214
ENV LD_LIBRARY_PATH=/lib;/lib32;/usr/lib
1315
ENV XDG_DOWNLOAD_DIR=/opt/JDownloader/Downloads
1416
ENV LC_CTYPE="en_US.UTF-8"
@@ -17,15 +19,10 @@ ENV LC_COLLATE="C"
1719
ENV LANGUAGE="C.UTF-8"
1820
ENV LC_ALL="C.UTF-8"
1921
ENV UMASK=''
20-
COPY ./${ARCH}/*.jar /opt/JDownloader/libs/
22+
COPY ./${TARGETPLATFORM}/*.jar /opt/JDownloader/libs/
2123
# archive extraction uses sevenzipjbinding library
2224
# which is compiled against libstdc++
23-
RUN mkdir -p /opt/JDownloader/app && \
24-
apk add --update libstdc++ ffmpeg wget procps && \
25-
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && \
26-
chmod 777 /opt/JDownloader/ -R && \
27-
apk del wget --purge && \
28-
rm /usr/bin/qemu-*-static
25+
RUN mkdir -p /opt/JDownloader/app
2926

3027
COPY daemon.sh /opt/JDownloader/
3128
COPY default-config.json.dist /opt/JDownloader/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json.dist
@@ -34,5 +31,15 @@ COPY configure.sh /usr/bin/configure
3431
EXPOSE 3129
3532
WORKDIR /opt/JDownloader
3633

37-
3834
CMD ["/opt/JDownloader/daemon.sh"]
35+
36+
RUN if [ "" = "$ISDEB" ]; then apk add --update libstdc++ ffmpeg wget procps && \
37+
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && \
38+
chmod 777 /opt/JDownloader/ -R && \
39+
apk del wget --purge; \
40+
else apt-get update && \
41+
apt-get install ffmpeg wget procps -y && \
42+
(java -version || apt-get install openjdk-8-jre) && \
43+
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && \
44+
chmod 777 /opt/JDownloader/ -R && \
45+
apt-get autoremove -y wget; fi

Makefile

+7-41
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,10 @@
1-
VERSION ?= 2.1.2
1+
VERSION ?= 2.1.3
22
CACHE ?= --no-cache=1
3-
FULLVERSION ?= ${VERSION}
4-
archs ?= amd64 arm32v6 armhf arm64v8
53

6-
.PHONY: all build publish latest
7-
all: build publish latest
8-
qemu-arm-static:
9-
cp /usr/bin/qemu-arm-static .
10-
qemu-aarch64-static:
11-
cp /usr/bin/qemu-aarch64-static .
12-
build: qemu-arm-static qemu-aarch64-static
13-
$(foreach arch,$(archs), \
14-
FILE=Dockerfile; \
15-
if [ $(arch) = amd64 ]; \
16-
then archi=$(arch); \
17-
image=bellsoft\\/liberica-openjdk-alpine:10.0.2-x86_64; \
18-
elif [ $(arch) = arm32v6 ]; \
19-
then archi=armel; \
20-
image=balenalib\\/raspberry-pi; \
21-
FILE=debian.Dockerfile; \
22-
elif [ $(arch) = armhf ]; \
23-
then archi=$(arch); \
24-
image=bellsoft\\/liberica-openjdk-alpine:10.0.2-armv7l; \
25-
else \
26-
archi=arm64; \
27-
image=bellsoft\\/liberica-openjdk-debian:11.0.20-aarch64; \
28-
FILE=debian.Dockerfile; \
29-
fi; \
30-
cat $$FILE | sed "s/FROM openjdk:jre-alpine/FROM $$image/g" > .Dockerfile; \
31-
docker build -t ghcr.io/jaymoulin/jdownloader:${VERSION}-$(arch) -t jaymoulin/jdownloader:${VERSION}-$(arch) -f .Dockerfile --build-arg ARCH=$${archi} ${CACHE} --build-arg VERSION=${VERSION} .;\
32-
)
4+
.PHONY: all build publish
5+
all: build publish
6+
build:
7+
docker buildx build --platform linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/amd64 ${PUSH} --build-arg VERSION=${VERSION} --tag jaymoulin/jdownloader --tag jaymoulin/jdownloader:${VERSION} ${CACHE} .
338
publish:
34-
docker push jaymoulin/jdownloader -a
35-
docker push ghcr.io/jaymoulin/jdownloader -a
36-
cat manifest.yml | sed "s/\$$VERSION/${VERSION}/g" > manifest.yaml
37-
cat manifest.yaml | sed "s/\$$FULLVERSION/${FULLVERSION}/g" > manifest2.yaml
38-
mv manifest2.yaml manifest.yaml
39-
manifest-tool push from-spec manifest.yaml
40-
cat manifest.yaml | sed "s/jaymoulin/ghcr.io\/jaymoulin/g" > manifest2.yaml
41-
mv manifest2.yaml manifest.yaml
42-
manifest-tool push from-spec manifest.yaml
43-
latest:
44-
FULLVERSION=latest VERSION=${VERSION} make publish
9+
PUSH=--push CACHE= make build
10+

README.md

+11-15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
> [!CAUTION]
2+
> As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.
3+
4+
> [!NOTE]
5+
> (This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)
6+
17
![logo](logo.png "logo")
28

39
JDownloader 2 - Docker Image
@@ -10,13 +16,10 @@ JDownloader 2 - Docker Image
1016
[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png "Buy me a coffee")](https://www.buymeacoffee.com/jaymoulin)
1117
[![Buy me a coffee](https://ko-fi.com/img/githubbutton_sm.svg "Buy me a coffee")](https://www.ko-fi.com/jaymoulin)
1218

13-
DISCLAIMER: As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support on Patreon.
14-
15-
(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance, support and stability there are many desirable features yet to be added.)
16-
1719
# Headline
1820

19-
This image allows you to have JDownloader 2 easily installed and controlled via [MyJDownloader](https://my.jdownloader.org/), thanks to Docker. No cluncky and rusty VNC sessions here!
21+
This image allows you to have JDownloader 2 easily installed and controlled via [MyJDownloader](https://my.jdownloader.org/), thanks to Docker.
22+
No cluncky and rusty VNC sessions here! No graphical interface - No problem!
2023

2124
Installation
2225
---
@@ -117,7 +120,9 @@ spec:
117120
type: Directory
118121
```
119122
120-
*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.
123+
> [!CAUTION]
124+
> *Note for RPI Zero*
125+
> You may need to specify that you want the arm32v6 image (e.g. `docker run -d --platform=linux/arm/v6 jaymoulin/jdownloader`) because rpi zero identifies itself as armhf which is incorrect (https://github.com/moby/moby/issues/41017) (https://github.com/moby/moby/issues/34875).
121126

122127
Configuration
123128
---
@@ -192,12 +197,3 @@ To get Direct Connection when using a bridged newtwork, please follow these step
192197
You can put a file called `jdownloader-block.txt` file in your Download folder to pause the container start.
193198
This will allow to connect to the container with a shell to debug. (`docker exec -it jdownloader sh`)
194199

195-
### Install Docker
196-
197-
If you don't have Docker installed yet, you can do it easily in one line using this command
198-
199-
```
200-
curl -sSL "https://gist.githubusercontent.com/jaymoulin/e749a189511cd965f45919f2f99e45f3/raw/0e650b38fde684c4ac534b254099d6d5543375f1/ARM%2520(Raspberry%2520PI)%2520Docker%2520Install" | sudo sh && sudo usermod -aG docker $USER
201-
```
202-
203-

debian.Dockerfile

-34
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

manifest.yml

-23
This file was deleted.

0 commit comments

Comments
 (0)