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

How to use a shared Dockerfile in the Docker task

In bamboo, I have created 2 stages. In the first one, I check out the source code and compile it. I've also created an artifact that is the Dockerfile located in the checked out directory and shared it. In the second stage, I've defined an artifact dependency which is the artifact I've created earlier in the previous stage.  For the destination directory, I've specified ../CAS-CR-JOB1/download-data/.  I've chosen the "Use an existing Dockerfile located in the task's working directory" option to make my intention clear that I want to use the shared Dockerfile. But I get "no such file or directory" when I run the plan.

To be honest, I doubt that the "Use an existing Dockerfile located in the task's working directory" should enable using the shared artifact, because the artifact is in the donor job's build directory. I can verify this by running the ls command. It shows an empty list. But if I try 'ls ../CAS-CR-JOB1/download-data' I get the Dockerfile listed.

So how would I use the Dockerfile produced from the previous stage and build that? What am I doing wrong?

1 answer

1 accepted

0 votes
Answer accepted

It turns out that if I want to have the shared artifact available in the current jobs working directory, then when creating the artifact dependency, in the Destination directory field I should write ".". After I did that, the problem got fixed.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events