Is it possible to run Bit Bucket with SSL on port 8443 in a the standard docker container?

I'm having problems getting Bit Bucket, Docker and SSL working together and I need a sanity check to see if anybody else has gotten this to work or if you know whether it's intended to work or not. I'm reading the documentation, https://bitbucket.org/atlassian/docker-atlassian-bitbucket-server, and don't see any direct references. Is everybody using a reverse proxy?

Error I'm getting follows;

Caused by: java.net.BindException: Address not available
at sun.nio.ch.Net.bind0(Native Method)

Netstat shows no open connections on ports 8443, 7999 or 5701 on the host and the container shutdowns down after the error so it's not consuming the ports.

I'm able to get it to listen on 7990 without ssl, (I tried 7990 with ssl turned on, and that didn't work) but when I add a configuration that I can get to work on a non-docker setup, it fails.  Yes, the keystore is in /mydir/bitbucket and I've tested the keystore on a non-docker instance.

 


bitbucket.properties

server.port=8443
server.secure=true
server.scheme=https
server.ssl.enabled=true
server.require-ssl=true
server.ssl.key-store=/var/atlassian/application-data/bitbucket/mykeystore.jks
server.ssl.key-store-type=jks
server.ssl.key-store-password=mypassword
server.ssl.key-password=mypassword
server.ssl.key-alias=myalias

 

/usr/bin/docker run \
--name mybitbucket \
-p 7999:7999 \
-p 8443:8443 \
-v /mydir/bitbucket:/var/atlassian/application-data/bitbucket \
docker.io/atlassian/bitbucket-server:5.16

 

 

1 answer

Hi @David Brunkow,

Is there any particular reason for using 8443 and not 443, apart from not having a proxy?

Perhaps, you could try making use of secure-bitbucket.env as described in https://bitbucket.org/atlassian/docker-atlassian-bitbucket-server/src/base-5/ or simply append to your docker command:

 -e SERVER_PROXY_NAME=mybitbucket \
-e SERVER_PROXY_PORT=443 \
-e SERVER_SCHEME=https \
-e SERVER_SECURE=true \
atlassian/bitbucket-server:latest

And have a proxy to handle the SSL certificate.

Port doesn't matter. Lets not get lost in 8443 vs 443.

The point is to not have a proxy. Is it possible to configure Bit Bucket running in the standard docker-bitbucket container, using the bitbucket.properties file, to run over ssl without using a proxy. 

The typical stand alone Bit Bucket setup supports this, but I don't see that it works with their docker image.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,906 views 7 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you