Window's Bamboo Server and Windows Docker Machine
Asked by Jeryl Cook:

I am running Bamboo and Docker on my windows environment. I cam execute docker with no issues from the command prompt. But Bamboo is not found the docker executable? i have it properly configured in the Server Capability \`"C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe"\` in Bamboo I believe.

```

com.atlassian.bamboo.task.TaskException: Failed to execute task
at com.atlassian.bamboo.plugins.docker.service.BuildService.execute(BuildService.java:53)
at com.atlassian.bamboo.plugins.docker.tasks.cli.DockerCliTask.execute(DockerCliTask.java:60)
at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:317)
at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:246)
at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:317)
at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:216)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)
at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:221)
at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129)
at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:138)
at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51)
at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
at java.lang.Thread.run(Unknown Source)
Caused by: com.atlassian.bamboo.plugins.docker.client.DockerException: Error running Docker build command
at com.atlassian.bamboo.plugins.docker.client.DockerCmd.build(DockerCmd.java:189)
at com.atlassian.bamboo.plugins.docker.service.BuildService.execute(BuildService.java:40)
... 17 more
Caused by: com.atlassian.utils.process.ProcessException: Error executing 'C:\Program Files\Docker\Docker\resources\bin\docker' build --force-rm=true --tag=reaper:1.0 C:\Users\twoen\bamboo-home\xml-data\build-dir\BOUN-BD-DOC
at com.atlassian.bamboo.plugins.docker.process.DockerTaskProcessService.execute(DockerTaskProcessService.java:60)
at com.atlassian.bamboo.plugins.docker.client.DockerCmd.build(DockerCmd.java:185)
```

<br />

I can run docker just fine from the command line:

"C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker"

<br />

Am I missing some configuration in Bamboo on Windows?

error in bamboo:

09-Jan-2018 21:17:14 Starting task 'Build Docker image' of type 'com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli'  
09-Jan-2018 21:17:14 Unable to find executable at "C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe". Will try to run it anyway.

running this from commandline works just fine, because windows docker is installed.

"C:\\Program Files\\Docker\\Docker\\resources\\bin\\docker.exe"


Answers:
author: anbern
body: In my version (6.2.1) Bamboo won't accept the backslash in the capability definition. Changing it to forward slahes works fine with me.


Tags: docker