It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Docker /opt folder content

Hi Team,

Within 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 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?



1 answer

0 votes
Dave_Chevell Atlassian Team May 25, 2020

Hey @Admin Everest ,


The VOLUME instruction "marks it as holding externally mounted volumes from native host or other containers." ( 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!



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

227 views 3 8
Join discussion

Community Events

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

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you