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!


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

Pipelines access docker host


I have set the runners, self hosted to my server. Everything works fine, runner is working and spins a new container which can also have docker using docker service.


- step:
- docker
- self.hosted
- linux
- docker ps -a
- docker images
- echo "OK"

 Now my problem is that docker ps -a and docker images are empty.

I think docker in docker works but is completely isolated from the host docker. However, this does not fulfill my need.

In the host (the same host the runner is running), I have the container that needs to be updated from the pipeline. I want to build a new image and run then: docker compose -f xxx.yml up -d

How can I do this using docker runner? Is the only solution using Linux shell instead which i will install directly on the host?

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 09, 2022

Hi @crash21,

This is not possible with Linux Docker Runners, as they limit access to the host.

One thing you could do is commit the Dockerfile and any other files you need to build the Docker image in your repo. These files will then be available during the build in the clone directory, so you can build the Docker image, start a container, push the image to a registry etc.

Otherwise, you can use a Linux Shell Runner, which provides access to the host. Please keep in mind that if you do things such as installing any applications, starting a database service, or editing a file outside of the build directory, during a build, these would potentially affect the next step to be run. So, you'll need to make sure that the scripts you run in each step won’t have a major impact on other steps or builds.

If you use a Linux Shell Runner, you will need to add the following command at the beginning of your script or before you run any Docker commands, in order to be able to use Docker:

- export DOCKER_HOST=""

This is because we are setting the variable DOCKER_HOST to tcp://localhost:2375, which can lead to issues.

If you have any questions, please feel free to let me know.

Kind regards,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events