Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
docker run -d --restart=always
\
-p {{service_port}}:8080

-p {{jmx_port}}:{{jmx_port}}
\
-e JAVA_OPTS='
    -Xmx{{java_memory_limit}}
   -XX:+UseConcMarkSweepGC
    -XX:NativeMemoryTracking=summary
    -Djava.rmi.server.hostname={{ansible_default_ipv4.address}}

    -Dcom.sun.management.jmxremote

    -Dcom.sun.management.jmxremote.port={{jmx_port}}

    -Dcom.sun.management.jmxremote.rmi.port={{jmx_port}}

    -Dcom.sun.management.jmxremote.local.only=false

-Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
'
    \
   -m={{container_memory_limit}}
   --memory-swap={{container_memory_limit}}
    \
    --name {{service_name}}
   \
    {{private_registry}}/{{image_name}}:{{image_version}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment