Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

"docker: command not found" error when running code-deploy pipe

Julien Richard-Foy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2019

I’ve copied the `script` entry given in the documentation of the atlassian/aws-code-deploy pipe and adapted to my needs:

pipelines:
branches:
master:
- step:
name: Build
image: node:10
script:
- ...
- step:
name: Deploy
script:
- pipe: atlassian/aws-code-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-2'
APPLICATION_NAME: $APPLICATION_NAME
COMMAND: 'upload'
ZIP_FILE: $ZIP_FILE
S3_BUCKET: $S3_BUCKET

When the pipeline is run, I get the following error:

 docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \

--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
...

bash: docker: command not found

My pipeline is using the default Docker image.

5 answers

1 accepted

4 votes
Answer accepted
Julien Richard-Foy
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2019

I was able to fix the problem by adding the `docker` service to my step:

 - step:
name: Deploy
services:
- docker
script:
- pipe: atlassian/aws-code-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
...
0 votes
Radu Cristescu April 11, 2025 edited

For me, this was caused by BCLOUD-22851. I have self-hosted runners where this error happens once in a blue moon.

I have a cron job on the lookout for this bug. For each runner, it looks for the `docker` directory. If it finds it, it stops the runner, removes the directory, and starts the runner again.

Unfortunately, a pipeline has to trigger the problem before the workaround kicks in, so the pipeline that triggers it will fail. But because the workaround kicks in automatically via cron, rerunning the pipeline will be fine.

0 votes
helgispbru
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 21, 2020

I have the same issue and this solutions doesn't help me.

Dipesh Rane March 1, 2021
pipelines:
branches:
master:
- step:
name: Build
image: node:10
script:
- ...
- step:
services:
- docker
name: Deploy
script:
- pipe: atlassian/aws-code-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-2'
APPLICATION_NAME: $APPLICATION_NAME
COMMAND: 'upload'
ZIP_FILE: $ZIP_FILE
S3_BUCKET: $S3_BUCKET

Dipesh Rane March 1, 2021

add docker as services it will fix the issue

Like Cuneyt Gurses likes this
Peter
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2021

You must have a reserved Variable called PATH, in your enviroment. 

0 votes
Xinyi Xu
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 22, 2020

Hey, accepted answer doesn't work for me. I was able to make it run adding optioins:docker: true to the end. See below

pipelines:
branches:
master:
- step:
name: Build
image: node:10
script:
- ...
- step:
name: Deploy
script:
- pipe: atlassian/aws-code-deploy:0.2.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'us-east-2'
APPLICATION_NAME: $APPLICATION_NAME
COMMAND: 'upload'
ZIP_FILE: $ZIP_FILE
S3_BUCKET: $S3_BUCKET

options:
docker: true
0 votes
Samuell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 27, 2019

I had same issue i just reruned pipelines again and it works.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, compass, developer experience, devex, platform engineering, internal developer platform, component catalog, atlassian learning, productivity tools, developer productivity, software architecture, compass webinar, engineering teams

Discover how Compass drives DevEx and productivity at Atlassian 🏃🏻‍♂️

Learn why Compass was built to tackle dev experience at scale. See how Atlassian uses it to boost visibility, reduce cognitive load, and drive consistency—plus tips to get started and customize your IDP for stronger team engagement.

Join the webinar ✨
AUG Leaders

Atlassian Community Events