Bamboo Docker task(daemon) failed to execute "mkdir" command


build	11-Aug-2015 15:40:07	Sending build context to Docker daemon 

error	11-Aug-2015 15:40:07	time="2015-08-11T13:40:07Z" level=fatal 
msg="Error: mkdir /mnt/docker/tmp/docker-build261033587: no such file or

simple	11-Aug-2015 15:40:07	Failing task since return code of [/usr/bin/docker
 build --force-rm=true --tag="bamboo/XXXXX-XXXXX:221" 
/home/bamboo/bamboo-agent-home/xml-data/build-dir/XXXX-BUILD-JOB1/application/build/distributions] was 1 while expected 0

This is executed in EC2 instance using Atlassian Ubuntu stock image. Restarting Docker service manually in SSH session seem to fix the problem in that running EC2 instance.

5 answers

1 accepted


You can actually just do the following in the Instance Startup Script:

$ sudo /etc/init.d/docker restart

Not sure why the docker service doesn't come up properly on it's own. But adding this fixed my issue.

Thank you! I forgot to come back to this issue and add this step to the instance startup script entry to my answer.

By following these steps (all the way at the bottom of the page) in the Bamboo instance:

sudo -i
#stop the docker daemon
service docker stop
#remove the broken devicemapper files
rm -rf /var/lib/docker 
service docker start

Just started having the same problem. Even after launching a few new ec2s. Is this an ubuntu issue? Did the AMI for ubuntu change recently introducing this issue? Not sure...

My Docker task also failed to executed the "mkdir" command.

Have the same problem. Seems to be in the way they remount /home to be the ephemeral drives. Docker containers see the empty /home that is "underneath" the mounted /home that has bamboo stuff on it. Very annoying.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,565 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you