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

Task not pulling Docker image on each build

Hi, I have a task that's using a Docker container to perform a deployment.

Under the "Docker" tab of the job I've selected "Docker container"

I've provided an image, and for this example let's say the tag is "stable". The tag doesn't change for this job.

In the Task I have a Script step. The "Interpreter" is "Shell". The "Script location" is "File". The "Script file" is "/". And I'm passing some values in "Argument".

The problem I'm facing is when I build a new image and push to our registry, this job doesn't pull the latest image.

I can make it pull if I create a new tag and set that in the "Docker" tab, but ideally the tag would remain the same. We want clients to use our "stable" tag for their builds and we continually build and push to that image.

Is there a way to ensure the Docker image is pulled before every run? Do I need to add another "Docker pull" task? I think that would work, but was hoping not to have to add another task.


1 answer

We have the same issue.

This is what works for me: I created another plan with a shell script that pulls the docker image I need. I schedule this plan to run daily. The latest docker is then updated in the cache.

Will that pull the image on all of the bamboo agents, or just the one where the shell script was executed?

I'm not sure what you mean. You can try and check to see  what happens.

See this  reference for pulling docker images:

Our Bamboo instance has multiple agents (separate machines that do the work for a plan). I'm pretty sure we've ruled out that option (separate job/plan to pull the image) because the shell script will be run on one of the agents. On that agent the Docker image would be pulled correctly. But not on all agents. So when our job that uses the Docker image runs, there's no guarantee it will run on the agent with the updated image.

Our administrators could set up a cron job and have that image pulled on every agent, but we'd prefer a checkbox on the job to indicate the agent should pull the image every time the job runs.

We've also pondered having a separate stage to pull the image, but stages within a plan aren't guaranteed to run on the same agent.

For now we've decided to tag each image release. We created a global Bamboo variable with the tag name and update it when we have a release. Each of the jobs that use this image use that variable to set the tag. That's been working and ensures the image is pulled every time the tag changes. It just requires one small manual step per release.

It's a shame that Bamboo doesn't support this simple feature.
Maybe in the future

Like wsams likes this

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events