Within https://hub.docker.com/r/atlassian/confluence-server/ I see that the /var directory is set to be a volume as it holds user data and what not.
Why isn't /opt/atlassian assigned to be a volume as well?
For instance, copied the mysql-connector-java-5.1.48.jar into the container and as it's not a persistent volume the file went away, there is a way of adding a file via docker-complse.yml file but still...
Also used this https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html work around to recover the admin credentials after restoring from my backup and the update was gone after stopping/starting confluence container.
Is it supposed to behave like this or am I missing the obvious?
Hey @Admin Everest ,
The VOLUME instruction "marks it as holding externally mounted volumes from native host or other containers." (https://docs.docker.com/engine/reference/builder/#volume). Because /opt/atlassian contains the Confluence installation directory, mounting it as a volume would result in overwriting the installation directory with whatever was mounted in its place. If you supplied the installation directory as a volume, upgrading to newer versions of Confluence via specifying a newer Docker version tag would have no effect: no matter what image you used, the updated installation directory would be replaced with your volume contents.
One alternative thing you could try is to mount the actual mysql jar file into the container:
docker run -d -v /path/to/mysql-connector-java-5.1.48.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-5.1.48.jar -p 8090:8090 atlassian/confluence-server:latest
Of course, there are a number of other alternative approaches you can take too.
I hope that helps!
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event