Docker Community Forums

Share and learn in the Docker community.

Change the - JVM_OPTS inside the container


(Glassboxdigital) #1

Hello
Recently i’ve been asked to change the JVM_OPTS inside the containers
Right now this is what we have in our container…

JAVA_OPTS="$JAVA_OPTS -server -Xms2G -Xmx2G Dcom.sun.management.jmxremote.port=$JMX_REMOTE_PORT -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

i’ve try to add the change parameter into our docker-compose file like this and isn’t working

networks:
default:
ipv4_address: 172.16.238.10
environment:
- JAVA_OPTS=-Xms4G -Xmx4G
volumes:
- “/home/ec2-user/site-conf:/tmp/site/conf/:rw”
extra_hosts:
- “site:172.16.238.10”

any suggesting how to resolved it ??