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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to access parent docker from inside a pipe?

I have the following step in my pipeline:


      - step:
          deployment: Client
            - apt-get stuff
            - ssh -N -L 4430:some_ip:4430 some_host &
            - sleep 10 # Give SSH tunnel some time to establish
            - curl -k https://localhost:4430 # Works
            - pipe: docker://tomerh2001/gitlab-merge-request-pipe:latest
                GITLAB_URL: https://host.docker.internal:4430

I am trying to understand which IP/Host I need to specify for the pipe to access the tunnel from the main flow. I tried `host.docker.internal` but that doesn't work.

For context, I have locally replicated the docker run command that bitbucket creates to run the pipe, and it works locally with host.docker.internal when I run the docker image of the custom pipe

I guess that in the pipeline context, the host.docker.internal resolves the host of the docker service itself? And since the SSH tunnel was created inside the pipeline (I.e. a docker container), would I need to somehow find the IP of that container in order to access the tunnel?

My goal is to access the tunnel from within the pipe. Any help will be greatly appreciated!

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 10, 2023

Hi Tomer,

What error do you get when you run the pipe?

Have you tried using http://host.docker.internal:4430 (instead of https)?

I'm not sure about the tunneling, but if I start an HTTP server on the build container on port 8000, the curl command works from within the pipe container if I use curl http://host.docker.internal:8000

I was also curious, why are you using an SSH tunnel instead of the GitLab URL in the GITLAB_URL variable?

Kind regards,

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events