Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to configure the docker service in self hosted runner?


According to the documentation at:

"How do I set up proxy for docker images?

With a self-hosted runner you can use a custom docker-in-docker service.

image:   docker:dind

Well, I'm doing that on self hosted runner and getting an error saying that I need to use a self hosted runner....

"The 'services' section in your bitbucket-pipelines.yml file contains a custom docker service. Remove 'image', 'variables' and 'environment' from the docker service definition or use a self-hosted runner for the step."

Below one of the many attempts that failed....

image: docker:dind
HTTP_PROXY: "http://localhost"
HTTPS_PROXY: "https://localhost"

image: alpine:latest

- step:
name: Build Deploy rev-proxy
runs-on: mylocalrunner
- ping localhost -c 1
- docker

1 answer

1 vote

Hi Rafael,

The runs-on parameter in the yaml file must contain a label named self.hosted. I believe that culprit here is that your yaml file has only the mylocalrunner label, so Pipelines doesn't see that step as a step that will run on your local runner.

You can modify the runs-on parameter as follows:

- self.hosted
- mylocalrunner

and this should allow the step to run on your runner. The label mylocalrunner should also exist on the runner you configured on Bitbucket website either from the repository settings or from the workspace settings.

Please feel free to let me know how it goes and if you have any questions!

Kind regards,

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,488 views 4 8
Read article

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