I get the following error when executing a Bamboo Script Task in a Isolate build Docker container:
simple 27-Jun-2019 Starting task 'XYZ' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'
command 27-Jun-2019 Beginning to execute external process for build 'XYZ'\n ... running command line: \n/tmp/runInDocker3301468521768702357.sh /home/bamboo/bamboo-agent-home/temp/XYZ-8591248614821374698.sh\n ... in: /tmp\n
error 27-Jun-2019 flag provided but not defined: -e
error 27-Jun-2019 See 'docker exec --help'.
simple 27-Jun-2019 Failing task since return code of [/tmp/runInDocker3301468521768702357.sh /home/bamboo/bamboo-agent-home/temp/XYZ-8591248614821374698.sh] was 125 while expected 0
simple 27-Jun-2019 Finished task 'list buckets' with result: Failed
The configuration is similar to this link Docker Runner the following and shown here:

Isolate build -> Docker container -> Docker image: `ubuntu:16.04`
The script task is:
Shell -> Inline
with the following simple content:
echo "Hallo AWS"
#!/bin/bash
The Bamboo version is 6.5.1.
Facing same/similar issue. I start my Bamboo plan
Isolate build -> Docker container -> Docker image: centos
I have a single inline script task that returns some data.
whoami
ls -la
pwd
The output is NOT from the container but from the agent. I would expect the path to be /home/bamboo as this is where I start when I run the image directly in docker.
19-Mar-2020 15:07:41 bamboo
19-Mar-2020 15:07:41 total 0
19-Mar-2020 15:07:41 drwxr-xr-x 2 bamboo bamboo 6 Mar 19 19:07 .
19-Mar-2020 15:07:41 drwxr-xr-x 3 root root 30 Mar 19 19:07 ..
19-Mar-2020 15:07:41 /home/bamboo/bamboo-agent-home/xml-data/build-dir/SANDY-JOB1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With