-
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Dockerfile
executable file
·45 lines (38 loc) · 1.67 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM bellsoft/liberica-openjdk-alpine:10.0.2-x86_64 as base-amd64-v1
FROM bellsoft/liberica-openjdk-alpine:10.0.2-armv7l as base-arm-v7
FROM bellsoft/liberica-openjdk-debian:11.0.20-aarch64 as base-arm64-v1
ENV ISDEB=1
FROM balenalib/raspberry-pi as base-arm-v6
ENV ISDEB=1
FROM base-${TARGETARCH}-${TARGETVARIANT:-v1}
ARG VERSION="2.1.2"
LABEL maintainer="Jay MOULIN <https://brands.jaymoulin.me/me/docker-jdownloader>"
LABEL version="${VERSION}-${TARGETPLATFORM}"
ENV LD_LIBRARY_PATH=/lib;/lib32;/usr/lib
ENV XDG_DOWNLOAD_DIR=/opt/JDownloader/Downloads
ENV LC_CTYPE="en_US.UTF-8"
ENV LANG="en_US.UTF-8"
ENV LC_COLLATE="C"
ENV LANGUAGE="C.UTF-8"
ENV LC_ALL="C.UTF-8"
ENV UMASK=''
COPY ./${TARGETPLATFORM}/*.jar /opt/JDownloader/libs/
# archive extraction uses sevenzipjbinding library
# which is compiled against libstdc++
RUN mkdir -p /opt/JDownloader/app
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
EXPOSE 3129
WORKDIR /opt/JDownloader
CMD ["/opt/JDownloader/daemon.sh"]
RUN if [ "" = "$ISDEB" ]; then apk add --update libstdc++ ffmpeg wget procps && \
wget -O /opt/JDownloader/JDownloader.jar "http://installer.jdownloader.org/JDownloader.jar?$RANDOM" && \
chmod 777 /opt/JDownloader/ -R && \
apk del wget --purge; \
else apt-get update && \
apt-get install ffmpeg wget procps -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; fi