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

Can I use the same docker container in pipeline diferent steps?

In my pipeline first step I build a docker container which I want to use in my following steps. Is this possible?

Thank you

1 answer

0 votes

@Nagore Garcíayes, sure, you can do it, just ensure you put building-pushing container step before actions where you use this image

In this case how do I do it?



- step:

name: initialize


- docker build -f -t app .

- docker run --rm -t -d --name app app

- step:

name: clean

script: - docker stop app

@Nagore García 

Basically, you may want to build and push to some registry image firstly.

In this case you can use it as in this documentation

or as a service - for service definition have a look at doc.


But if you don't want to push, you may want to use docker save/docker load command and pass image archive created by docker save through artifacts.


I guess, this is non-standard solution, for best practice it would be better to push image (e.g., dockerhub allows to store several private repos for free).


Regards, Galyna

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

106 views 2 4
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