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

Limitations of docker networking in Bitbucket Pipelines

alex_marchenko February 22, 2020

Are there any limitations on docker networking Bitbucket Pipelines?

I try the following in one of the steps:

  1. Create a bridge network `somenet`
  2. Start a container with a set name `onecontainer` and specify that it should be connected to `somenet` via `--network somenet`
  3. Start the second container connected to the same network and attempt to resolve first containers name by passing `getent hosts onecontainer` as a command.

When executed on my local machine, it prints the IP of the first container.

When executed in the pipeline, it produces non-zero exit code and crashes the pipeline. Changing version of docker image for the step (stable/latest) doesn't seem to have any effect.

I haven't run into any other issues with docker in pipelines yet. 

Is this a known limitation of the Bitbucket Pipelines? Are there any workarounds?

1 answer

0 votes
ktomk
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.
October 2, 2020

Docker (networking) is limited within Bitbucket Pipelines. This is why you see it working on your local machine (docker is not limited there, you have full privileges) but failing on Bitbucket Pipelines.

As you have not shared the commands nor the errors it's hard to give more concrete directions.

The following article gives some more details about Docker networking on Atlassian Bitbucket Cloud in Pipelines:

Some more references, the first is a bit full of marketing but should nevertheless give a good overview and the scone is another Bitbucket blog post going into details on Docker and Docker Compose usage in pipelines. The third is a blog post by some hacker with a concrete setup comparing using local and Bitbucket Pipelines regarding Docker (in a docker compose setup):

HTH, if you still have the issue in concrete (your original posting is some weeks older), feel free to leave comments.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events