Skip to content

JAVA_OPTIONS cannot be set in docker-compose.yml #3350

@oers

Description

@oers

Current Behavior

I am trying to limit the RAM the api server uses with docker-compose. Currently it uses 90% RAM which is not desired (I dont use docker swarm, therefore the resource limits do not work).
When setting JAVA_OPTIONS or EXTRA_JAVA_OPTIONS in docker-compose.yml I Always get:

dtrack-apiserver_1  | Error: Could not find or load main class "-XX:+UseParallelGC
dtrack-apiserver_1  | Caused by: java.lang.ClassNotFoundException: "-XX:+UseParallelGC

I tried '- JAVA_OPTIONS="-XX:+UseParallelGC -XX:MaxRAMPercentage=33.0"' and ' - EXTRA_JAVA_OPTIONS="-XX:+UseParallelGC -XX:MaxRAMPercentage=33.0"'

Steps to Reproduce

Setting '- JAVA_OPTIONS="-XX:+UseParallelGC -XX:MaxRAMPercentage=33.0"' and ' - EXTRA_JAVA_OPTIONS="-XX:+UseParallelGC -XX:MaxRAMPercentage=33.0"'

Expected Behavior

RAM usage can be configured in docker-compose without using docker swarm

Dependency-Track Version

4.10.1

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

14.3

Browser

Google Chrome

Checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomersp2Non-critical bugs, and features that help organizations to identify and reduce risk

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions