Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,550
Community Members
 
Community Events
184
Community Groups

How to change Java Trust Store for Dockerfile

According to the warning on How to change the JVM parameter for a Docker container | Bitbucket Data Center and Server | Atlassian Documentation I can set the cacerts/ Java Trust Store path in my docker file using JVM_SUPPORT_RECOMMENDED_ARGS parameter, as I'm after v4.0 (7.6.0 now)

Can anyone show me how?? I cannot find an example anywhere, not even on the docker readme!

I have my cacerts in my docker home which is mapped as a volume, but obviously need to change startup params to read this location instead of the images own default /opt/.... path to its JVM.

 

I'm sure this is a one-liner, just don't want to mess up my install!
My docker file section for BB is like this:


bitbucket:
image: atlassian/bitbucket-server:7.6.0
container_name: bitbucket
environment:
ELASTICSEARCH_ENABLED: 'true'
JDBC_DRIVER: com.microsoft.sqlserver.jdbc.SQLServerDriver
JDBC_USER: sa
JDBC_PASSWORD: ***************************
JDBC_URL: 'jdbc:sqlserver://mssql:1433;databaseName=BitbucketDB'
volumes:
- '/var/bitbucket/home/:/var/atlassian/application-data/bitbucket/'
ports:
- '7999:7999'
expose:
- '7990'
networks:
- backend

Expecting to add the  JVM_SUPPORT_RECOMMENDED_ARGS bit in there I guess?

 

Really appreciate the help on this, will solve some internal integrations :)

1 answer

1 accepted

0 votes
Answer accepted
Dave Chevell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 28, 2021

Hi @Jonathan Ward ,

If your cacerts file (your trust store) is located inside your $BITBUCKET_HOME folder, then you would tell your containers to use it like so:

environment:
JVM_SUPPORT_RECOMMENDED_ARGS="-Djavax.net.ssl.trustStore=/var/atlassian/application-data/bitbucket/cacerts" 

If you're using multiple nodes in a Data Center configuration, and you intend to use the same trust store for all nodes, you might instead choose to store your cacerts file inside $BITBUCKET_HOME/shared so all nodes can retrieve the same copy from your shared storage.

Hope that helps!

Dave

Thanks, @Dave Chevell 
Slight edit on your snippet needs to be 

 JVM_SUPPORT_RECOMMENDED_ARGS: '-

At least on whatever I'm running, it failed to start when I pasted this in as-is!

The good news is this has fixed my issues with integrating our Jenkins server, so thank you so much for this!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.6.0
TAGS
AUG Leaders

Atlassian Community Events