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
Community Members
Community Events
Community Groups

Docker Network Type


Hey there,

Firstly, this is great - I love that we can run our pipelines on premise now.

With that said, I have a strange request. I need to be able to configure the build container that runs to use --net=host, as opposed to bridge.

Because it doesn't seem possible to configure the docker daemon to use host networking by default, is there a way I can configure bitbucket pipelines to launch my container with --host=net ?


1 answer

0 votes
lassian Atlassian Team Mar 07, 2021

Hi Justin,

Thanks for the feedback, currently we are aiming to first be feature parity with our cloud runner as this would be an extra feature we may allow for self hosted runners in the future.

In the meantime can you please help us understand your use case some more as to why you would to use host mode networking?

Kind Regards,
Nathan Burrell

Hey mate,

So a bit of a strange one. We use Slurm (wrapped in AWS Parallel Cluster) HPC to run jobs.

To run a job on our HPC Cluster, we run a command i.e. "srun hostname" which will run the "hostname" command on a random node in our cluster.

The node that runs the job needs to communicate back to the machine that initiated the request over TCP, and because docker essentially NAT's and we can't mass port-forward ports to the container as we need to be able to run multiple pipelines at the same time (and if we just forward a bucket load of ports additional containers will fail to launch), we need the container that we run for the build process in host mode so the node running the job can TCP directly back to the container, if that makes sense :)

Hope that makes sense?

I'm still tyring to come up with a workaround but changing the mode of the containers that are launched from the runner is the path of least resistance (at least for me!).

Like # people like this

How can a self hosted runner use the host network when running the containerized step? ( use case, running a VPN network in the host and using curl)


docker container run –network host --name
lassian Atlassian Team Nov 02, 2021

Hi Luis,

You can add a custom dind daemon to your step following these instructions and spin up containers inside of that via your build script using host networking.

In the future we are looking to provide a non docker runtime that gives direct access to the host aswell to allow you to run scripts on the host allowing them access to the hosts network adapters aswell.

Kind Regards,

Suggest an answer

Log in or Sign up to answer

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