The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

How to use a shared Dockerfile in the Docker task

mikayil-abdullah
May 20, 2019

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
mikayil-abdullah
May 20, 2019

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.

TAGS
AUG Leaders

Atlassian Community Events