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

In Pipelines, Is it possible to use the same image for multiple steps ?


Hey all, 


I have a repo that has a number of steps and the process is quick but before every step is pulls a new image even though it is the same. Is there a way I can pull the image once and run all steps/deploymets using the same image ? 



1 answer

0 votes

Hey @Luiz Felipe Puccinelli Glingani

According to our documentation each step runs it’s own separate Docker container, which means that they must run in a different context for each step.

You can define a global image for your build, which will use the same image for your whole build, like this for example:

image: openjdk        #this image will be used by all steps unless overridden 
    - step:
        - npm install
        - npm test
    - step:      
        - npm install
        - npm test

Let me know if this helps!


Hey Gabi


Thanks for your reply. I am using a global image already.


However, the biggest problem I have is that every single step will pull and clone a new image, even though is the same as the step before, and that slow down my release significantly.


I would love if I could pull/clone the image once and run multiple steps. 


Any suggestions ?




Hey, @Luiz Felipe Puccinelli Glingani

As you can see in our Configure bitbucket-pipelines.yml doc, 'each step starts a new Docker container that includes a clone of your repository, and then runs the contents of your script section inside it. '

Which means that you can't use multiple steps here :( 

there are no updates for this feature?

Make sense if this can be an option as there would be many steps that can be removed between steps and be reused for a specific pipeline.

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,792 views 10 16
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