Greetings Atlassian Community,
Recently I have been trying to set up a CI-environment with a Docker-in-a-Docker (Dind) setup with a shared `docker.sock` (sibling strategy). Now everything seems to work okay-ish, however Bamboo is unable to run my defined job script:
Beginning to execute external process for build 'php-stack-test - test - Job 1 #9 (PHPSTACK-TEST-JOB1-9)'\n ... running command line: \n/opt/atlassian/bamboo/temp/runInDocker9198014177222089800.sh /bin/sh /var/atlassian/bamboo/temp/PHPSTACK-TEST-JOB1-9-ScriptBuildTask-3671834363422173327.sh\n ... in: /opt/atlassian/bamboo/temp\n
error 14-Jul-2018 11:28:03 /bin/sh: can't open '/var/atlassian/bamboo/temp/PHPSTACK-TEST-JOB1-9-ScriptBuildTask-3671834363422173327.sh'
I notice the "ScriptBuildTask" file is deleted immediately after creation in the shared temp volume. I am unsure what deletes this file.
My Bamboo Spec file:
project:
key: PHPSTACK
plan:
key: TEST
name: test
dockerImage: my-docker-registry.serveo.net/my-php
stages:
- jobs:
- scripts:
- composer -n install --prefer-dist --no-dev
- phpunit
Both the whoami of the Bamboo and the test container show me as a root user.
The Bamboo container runs this docker build command:
/usr/bin/docker run --volume /var/atlassian/bamboo/xml-data/build-dir/PHPSTACK-TEST-JOB1:/var/atlassian/bamboo/xml-data/build-dir/PHPSTACK-TEST-JOB1 --volume /var/atlassian/bamboo/temp:/var/atlassian/bamboo/temp --detach --name f1851818-15e5-4023-a5e1-2542acbe28b61179650 --net=host my-docker-registry.serveo.net/my-php tail -f /dev/null
If any more information is needed, please let me know.
With kind regards,
EDIT
I have file watched the temp folder on the host mounted volume, which resulted in the following chronological output:
-rw-r--r-- 1 user staff 417821 Jul 18 10:57 /Users/user/Intern/Bamboo_data/temp/webresources/3.cachedfile
event: 514
-rw-r--r-- 1 user staff 434571 Jul 18 10:57 /Users/user/Intern/Bamboo_data/temp/webresources/4.cachedfile
event: 514
-rw-r--r-- 1 user staff 436181 Jul 18 10:57 /Users/user/Intern/Bamboo_data/temp/webresources/3.cachedfile
event: 518
-rw-r--r-- 1 user staff 2322164 Jul 18 10:57 /Users/user/Intern/Bamboo_data/temp/webresources/4.cachedfile
event: 518
-rw-r--r-- 1 user staff 215131 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/5.cachedfile
event: 514
-rw-r--r-- 1 user staff 119222 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/6.cachedfile
event: 514
-rw-r--r-- 1 user staff 436181 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/5.cachedfile
event: 518
-rw-r--r-- 1 user staff 2320617 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/6.cachedfile
event: 518
-rw-r--r-- 1 user staff 427717 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/7.cachedfile
event: 514
-rw-r--r-- 1 user staff 436181 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/7.cachedfile
event: 518
-rw-r--r-- 1 user staff 5826 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/8.cachedfile
event: 518
-rw-r--r-- 1 user staff 434571 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/10.cachedfile
event: 514
-rw-r--r-- 1 user staff 13036 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/9.cachedfile
event: 518
-r-xr--r-- 1 user staff 50 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/PHPSTACK-TEST-JOB1-11-ScriptBuildTask-5451486074298017692.sh
event: 551
ls: /Users/user/Intern/Bamboo_data/temp/PHPSTACK-TEST-JOB1-11-ScriptBuildTask-5451486074298017692.sh: No such file or directory
event: 559
-rw-r--r-- 1 user staff 2340466 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/webresources/10.cachedfile
event: 518
With the path of the following line being red:
-r-xr--r-- 1 user staff 50 Jul 18 10:58 /Users/user/Intern/Bamboo_data/temp/PHPSTACK-TEST-JOB1-11-ScriptBuildTask-5451486074298017692.sh