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

Not able to start windows docker container on build agent Edited

I am trying to run build plan on a windows docker container instead of directly on windows agent itself. 


bamboo-agent.JPG

 

For some reason bamboo tries to start docker container with "--net host" mode and since windows container doesn't support this mode, it is failing. I need to find a way to prevent bamboo from using host mode, but I am not finding any configuration in my bamboo server.

Bamboo is trying to start container like following: 

C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --volume C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1:C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1 --volume C:\Users\Administrator\bamboo-agent-home\temp:C:\Users\Administrator\bamboo-agent-home\temp --detach --name 0eed3b21-3a3c-41e8-8e1b-1551be98f9c993388925 --net=host microsoft/windowsservercore tail -f /dev/null
... in: C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1

Following is the error I am receiving:

12-Apr-2019 15:53:06	Beginning to execute external process for build 'panda - panda-docker-WIP.py - Default Job #2 (PAN-PAND-JOB1-2)'\n ... running command line: \nC:\Program Files\Docker\Docker\Resources\bin\docker.exe run --volume C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1:C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1 --volume C:\Users\Administrator\bamboo-agent-home\temp:C:\Users\Administrator\bamboo-agent-home\temp --detach --name 0eed3b21-3a3c-41e8-8e1b-1551be98f9c993388925 --net=host microsoft/windowsservercore tail -f /dev/null\n ... in: C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1\n
build	12-Apr-2019 15:53:07	8f45a0ceae2a7f29d1a7753ea54a1261e61551aa58c544184ff84edaa350342f
error	12-Apr-2019 15:53:08	C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: network host not found.
error	12-Apr-2019 15:53:08	Failed to start docker container 0eed3b21-3a3c-41e8-8e1b-1551be98f9c993388925
error	12-Apr-2019 15:53:08	com.atlassian.bamboo.docker.DockerException: Error running Docker run command
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.docker.DockerContainerServiceImpl.run(DockerContainerServiceImpl.java:118)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.v2.build.agent.docker.DockerContainerControllerImpl.startContainerIfRequired(DockerContainerControllerImpl.java:79)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:173)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:122)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:117)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:126)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error	12-Apr-2019 15:53:08		at java.lang.Thread.run(Unknown Source)
error	12-Apr-2019 15:53:08	Caused by: com.atlassian.utils.process.ProcessException: Error executing C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --volume C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1:C:\Users\Administrator\bamboo-agent-home\xml-data\build-dir\PAN-PAND-JOB1 --volume C:\Users\Administrator\bamboo-agent-home\temp:C:\Users\Administrator\bamboo-agent-home\temp --detach --name 0eed3b21-3a3c-41e8-8e1b-1551be98f9c993388925 --net=host microsoft/windowsservercore tail -f /dev/null
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.docker.DockerContainerServiceImpl.execute(DockerContainerServiceImpl.java:255)
error	12-Apr-2019 15:53:08		at com.atlassian.bamboo.docker.DockerContainerServiceImpl.run(DockerContainerServiceImpl.java:106)
error	12-Apr-2019 15:53:08		... 11 more


 

1 answer

Hi @Yogesh Gupta ,

Docker runner is not supported on Windows platform. Please, have a look at:

Kind regards,
Rafael

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 ...

215 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