Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Bamboo jobs in Docker

Hello,

I'm struggeling to get Bamboo work with Docker. I've followed the guide "Getting started with Docker and Bamboo" and "Run Bamboo jobs in Docker".

Want i've done is that i have selected "Run this job  in Docker container", as Docker image i entered golang:latest. The only task i have is source code checkout. This works fine. I can verify that the images are downloaded in Docker.

But, the problems start when i try to add a script task. As soon as i do, the job fails. No matter what i enter in the script it always fails with:

/var/folders/37/r_d7kk1n3pv22f0sg1n2_m4c0000gn/T/runInDocker5199371102598774497.sh: line 2: docker: command not found
/var/folders/37/r_d7kk1n3pv22f0sg1n2_m4c0000gn/T/runInDocker5199371102598774497.sh: line 4: docker: command not found
/var/folders/37/r_d7kk1n3pv22f0sg1n2_m4c0000gn/T/runInDocker5199371102598774497.sh: line 5: docker: command not found
/var/folders/37/r_d7kk1n3pv22f0sg1n2_m4c0000gn/T/runInDocker5199371102598774497.sh: line 6: docker: command not found

I'm not sure in which context the scrupt runs, but i imagine it's in the container? So i should be able to enter something like: /usr/local/go/bin/go version to print the version? Or is it in the context of the build server?

Anyway, no matter what i enter in the script body it always fails. What am i doing wrong here? All built-in tasks seems to work, i can check out source or clean the build directory.

I would really appreciate any input...

2 answers

1 accepted

0 votes
Answer accepted

I turned out i did it right all the time. BUT: for some reason the BrowserStack add-on seems to mess things up for Docker. Once i uninstalled that add-on, it worked as expected.

2 votes
edwin Community Leader Oct 23, 2019

Hi @Jonas Lindau ,

The error is referring to a docker command being run. Running the same threw the same error for me.

Screen Shot 2019-10-23 at 12.04.14 PM.png

23-Oct-2019 13:03:29go version go1.13.3 linux/amd64
23-Oct-2019 13:03:29/root/bamboo-agent-home/temp/CREAT-CREAT-JOB1-12-ScriptBuildTask-8129363533094282042.sh: line 3: docker: not found

Please remove any docker commands from your script.

Add the following to your script task and it should run

go version

That is strange, because the only line i have in my script task is:

go version

There is no docker command at all as you can see in this screen shot:

bamboo_script.PNG

 

But the job still fails with this error:

bamboo_log.PNG

All Docker related task earlier in the plan works just fine.

Still no luck for me...

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

243 views 4 6
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