Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for passing additional JVM arguments #142

Merged
merged 1 commit into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ services:
MYJD_PASSWORD: bar #optional (see [Identify](https://github.com/jaymoulin/docker-jdownloader#identify))
MYJD_DEVICE_NAME: goofy #optional
XDG_DOWNLOAD_DIR: /opt/JDownloader/Downloads #optional
VMARGS: -Xmx2g #optional
PUID: 1000 #optional user id - not recommanded
GID: 1000 #optional group id - not recommanded
ports:
Expand Down Expand Up @@ -149,6 +150,7 @@ You can set many parameters when you configure this container, but you must spec
| `MYJD_PASSWORD=foo` | Your MyJDownloader password |
| `MYJD_DEVICE_NAME=goofy`| The device name that will appear on MyJdownloader portal |
| `XDG_DOWNLOAD_DIR=/opt/JDownloader/Downloads` | If you use this variable, set it as per the downloads folder volume! |
| `VMARGS` | Additional arguments to pass to the Java VM (e.g. heap memory limit) |
| `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) |
| `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 |
| `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 |
Expand Down
4 changes: 2 additions & 2 deletions daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ fi

if [ -n "$PUID" ] && [ $(id -u) -eq 0 ]; then
chown -R ${PUID}:${GID} /opt/JDownloader/
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' &
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' &
else
java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -jar /opt/JDownloader/app/JDownloader.jar -norestart &
java -Dsun.jnu.encoding=UTF-8 -Dfile.encoding=UTF-8 -Djava.awt.headless=true $VMARGS -jar /opt/JDownloader/app/JDownloader.jar -norestart &
fi
PID=$!
while [ "$PID" ]
Expand Down