Jira docker container recreates dbconfig.xml when restarting container

joshysav August 20, 2019

Hi peoples,

Running Jira in a docker container that is accessible using a proxy server (nginx). I've modified the dbconfig.xml to route using the proxy. 

But it seems that the dbconfig.xml is rewritten by init, each time I restart the container.

 

Hope this is enough information.

 

 

2 answers

1 accepted

0 votes
Answer accepted
Johann Kiefel August 21, 2019

yes, we have the same problem

we use the official docker image : atlassian/jira

After initial setup, everything works fine.

If we stop the container and start it again, the setting in dbconfig.xml get lost. We have todo the setup again. Of cource it doesn't work, because the DB is not empty anymore.

How can we prevent that dbconfig.xml is replaced through an empty template during the start of jira docker container.

Chris G. August 21, 2019

You are right. The entrypoint.py:L54-65 overwrites server.xml, dbconfig.xml and so on.

So basically commenting L54 to L65 should stop the overwrites.

I would create a bug report but i can't find the repository.

joshysav August 22, 2019

Thank you very much Johann and Chris for taking the time to answer! 

I'm not able to find the location to report this bug (feature). In the meantime I have commented out L54 to L65, then commited atlassian/jira to a new docker image.

To create a new image based on the changes.

# login to jira container
docker exec -it jira bash 

# install editor on jira container

apt update
apt install vim

# modify entrypoint.sh
cd /
vim entrypoint.sh

# comment out lines L54 to L65

# save and exit vim
:wq

# logout of jira container
exit

# stop jira
docker stop jira

# copy jira to new image

git commit jira custom/my-new-jira

# remove old jira container
docker rm jira

then install and run /custom/my-new-jira container
 

 

Hope this might be of help to someone in the future.

 

Thanks again!

0 votes
Chris G. August 22, 2019

Looking at tag 8.3.2 the issue should be fixed.

There is now an "overwrite" parameter which is set to "false" for dbconfig.xml and hence only creates the file from the template if it doesn't exist.

Suggest an answer

Log in or Sign up to answer