I have a self-hosted docker which runs on bitbucket pipeline. I wanted to make sure that this docker container should runs in network host mode.
Where do I need to specify to make sure the pipeline container opens in that network mode?
G'day, @Nikhil Chowdary
Welcome to the community!
May I know by self-hosted do you mean our Bitbucket runner? If yes, I believe the following KB should be able to help you achieve in using --network in your pipeline build:
Using --network parameter in Docker commands in Bitbucket Pipelines
Regards,Syahrul
Hi @Syahrul
Thanks for your response. Yes, I mean Bitbucket runner.
The following KB link you provided is redirecting to this same page. Can you please check the link again?
Best,
Nikhil
Wanted to provide more info.
I have created an image using DockerFile and I pushed the image to the DockerHub.
And in my bitbucket-pipeline.yml, I am calling that docker image.This is the basic code:
Hey @Nikhil Chowdary
I apologize for the invalid link, please check the following link:
Using --network parameter in docker
That said, the runner's container starts with the --network host option. However, during the build process, the build container is launched as a sidecar with bridge networking, instead of host networking. This configuration is part of the internal networking setup to facilitate communication between containers associated with the runners.
--network host
To ensure proper network functionality, please follow these steps:
sysctl net.ipv4.ip_forward
iptables
iptables -t nat -L -n -v
It looks like you're new here. Sign in or register to get started.