Skip to content

Commit 43640aa

Browse files
committed
Add option for passing additional JVM arguments
1 parent e02137d commit 43640aa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ services:
5151
MYJD_PASSWORD: bar #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
5252
MYJD_DEVICE_NAME: goofy #optional
5353
XDG_DOWNLOAD_DIR: /opt/JDownloader/Downloads #optional
54+
VMARGS: -Xmx2g #optional
5455
PUID: 1000 #optional user id - not recommanded
5556
GID: 1000 #optional group id - not recommanded
5657
ports:
@@ -149,6 +150,7 @@ You can set many parameters when you configure this container, but you must spec
149150
| `MYJD_PASSWORD=foo` | Your MyJDownloader password |
150151
| `MYJD_DEVICE_NAME=goofy`| The device name that will appear on MyJdownloader portal |
151152
| `XDG_DOWNLOAD_DIR=/opt/JDownloader/Downloads` | If you use this variable, set it as per the downloads folder volume! |
153+
| `VMARGS` | Additional arguments to pass to the Java VM (e.g. heap memory limit) |
152154
| `UMASK="0002"` | Defines specific rights for your downloaded files (default: undefined) - Must respect octal form (begins with 0 followed by three numbers between 0 and 7 included) (cf. https://en.wikipedia.org/wiki/Umask) |
153155
| `PUID=1000` | Your user id (for your user privileges) - workaround for closed systems, prefer `-u` flag method instead [Docker documentation](https://docs.docker.com/engine/reference/commandline/exec/#options) - Ignored if user flag is used |
154156
| `GID=1000` | Your group id (for your user privileges) - workaround for closed systems, prefer `-u` flag method instead [Docker documentation](https://docs.docker.com/engine/reference/commandline/exec/#options) - Ignored if user flag is used |

daemon.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ fi
6464

6565
if [ -n "$PUID" ] && [ $(id -u) -eq 0 ]; then
6666
chown -R ${PUID}:${GID} /opt/JDownloader/
67-
su jdown -c '${JAVA_HOME}/bin/java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -jar /opt/JDownloader/app/JDownloader.jar -norestart' &
67+
su jdown -c '${JAVA_HOME}/bin/java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true $VMARGS -jar /opt/JDownloader/app/JDownloader.jar -norestart' &
6868
else
69-
java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -jar /opt/JDownloader/app/JDownloader.jar -norestart &
69+
java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true $VMARGS -jar /opt/JDownloader/app/JDownloader.jar -norestart &
7070
fi
7171
PID=$!
7272
while [ "$PID" ]

0 commit comments

Comments
 (0)