Skip to content

JAVA_OPTIONS breaks jetty start #133

@arkanovicz

Description

@arkanovicz

Docker image: jetty:10.0.13-jdk11

If I have the following compose.yml file :

services:
  test:
    container_name: test
    image: jetty:10.0.13-jdk11
    volumes:
      - ./someapp.war:/var/lib/jetty/webapps/ROOT.war
    ports:
     - '127.0.0.1:8080:8080'

Everything works fine. But if I just try to add JAVA_OPTIONS to it, like this:

services:
  test:
    container_name: test
    image: jetty:10.0.13-jdk11
    volumes:
      - ./someapp.war:/var/lib/jetty/webapps/ROOT.war
    ports:
     - '127.0.0.1:8080:8080'
    environment:
     - JAVA_OPTIONS='-Xmx1g'

then the container exists right away with the error:

test  | Error: Could not find or load main class '-Xmx1g'
test  | Caused by: java.lang.ClassNotFoundException: '-Xmx1g'
test exited with code 1

Inside the container, when the bug happens, the file /var/lib/jetty/jetty.start is empty.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions