Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence docker failing when --net=host

B G
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2018

Hi Atlassian,

I am just setting up Confluence on my Synology DS916+ on docker. In the beggining, I just could not get it running for the life of me. I tried to install it through the synology docker UI, but it just would not start.

I then tried from SSH:

sudo docker run -v /volume1/docker/confluence:var/atlassian/application-data/confluence --name="confluence" -d --net=host atlassian/confluence-server

This however did not work either, same thing as trying from the UI.

I then tried without using host network, and it worked, I think. Using this in SSH:

sudo docker run -v /volume1/docker/confluence:var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

So my question is, why does it not work with --net=host? Am I doing something wrong probably? 

I must admit, I would like some feedback on when to use --net=host, as that is what I have always been doing with all my other containers, so I am unsure whether I should go through my other containers and change something.

1 answer

0 votes
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2018

Hi @B G,

--net host is used when you'd like a number of containers inside the same network. So in your example, Confluence is utilizing the host network instead of Docker's network.

So my question is, why does it not work with --net=host? Am I doing something wrong probably?

It's because the port isn't specified. You'll find that Confluence is running but the port isn't opened and forwarded on your host computer. Running both should fix your issue

--net host -p 8090:8090

 This is a lot of times used when a container interacts with an application that's in the host network. Or if the Docker network doesn't have access to the internet and you'd like to start a container in a different network or without a network at all

--net none

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events