DEV Community

Discussion on: Small Alpine Linux containers with Java

Collapse
 
k4ml profile image
Kamal Mustafa

For adding more modules:-

RUN ["/opt/jdk/jdk-14/bin/jlink", "--compress=2", \
     "--module-path", "/opt/jdk/jdk-14/jmods/", \
     "--add-modules", "java.base,java.instrument,java.xml", \
     "--output", "/jlinked"]

Take notes there should not be any space between the modules. For example java.base, java.instrument will fail. Took me sometimes to figure out.