Background
I'm creating a new tool that integrates with Jira & Bitbucket (as external dependencies) and I'm setting up a kubernetes pod environment that spins a container for each, with the intention to execute integration tests against the actual pre-configured instances.
I bake the jira/bitbucket images already with a pre-configured JIRA/BITBUCKET HOME dir like this:
```
FROM docker.artifactory.mwam.local/atlassian/jira-software:9.6.0
COPY jira/ /var/atlassian/application-data/jira/
```
I should notice that the pre-existing config comes with various changes that might be difficult to replay on-demand, and thus it is convenient to bake them in the image. There is also a trial license loaded in the same way.
Problem
This works when I run the container locally, but fails when it runs in kubernetes. I suspect the reason is the server-id which is different on the kube instance (probably every time it is different), and thus invalidates any pre-existing DB/config.
What is the recommended way to spin off functional, short-lived jira/bitbucket instances, for the purpose of CI/CD integration testing, while using preexisting DB/config. Should I import the config/db instead of baking it in? If so, can this be done from the Dockerfile or the CLI (e.g. in an entrypoint script)?