docker-atlassian-jira icon indicating copy to clipboard operation
docker-atlassian-jira copied to clipboard

Configure JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY

Open eampudia opened this issue 6 years ago • 3 comments

Dear Martin, Thanks for your contribution to the docker community, it will be nice to be able to changes the values of the memory to run Jira adding some docker variables.

Thanks,

Emilio

eampudia avatar Sep 07 '18 10:09 eampudia

I have a small fix for this problem in my own Dockerfile

FROM cptactionhank/atlassian-jira:7.12.2

USER root:root

ENV JVM_MAXIMUM_MEMORY 768m
ENV JVM_MINIMUM_MEMORY 384m

# make memory 
RUN set -x \
    && sed --in-place 's/JVM_MINIMUM_MEMORY=.*/#JVM_MINIMUM_MEMORY=/g' /opt/atlassian/jira/bin/setenv.sh \
    && sed --in-place 's/JVM_MAXIMUM_MEMORY=.*/#JVM_MAXIMUM_MEMORY=/g' /opt/atlassian/jira/bin/setenv.sh

# change user
USER daemon:daemon

0rph3us avatar Sep 28 '18 06:09 0rph3us

An option would also be to mount your own setenv.sh on top of the existing one, at runtime. You can mount a specific item in a config map in K8s, per this SO answer.

bradjones1 avatar Oct 29 '18 20:10 bradjones1

It is possible to change the memory parameters, among others, through the variable JAVA_OPTS

JAVA_OPTS: "-Xms4g -Xmx4g"

riav avatar Jun 19 '19 18:06 riav