Forums

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

bash: docker: command not found

Harshad Prajapati March 27, 2025

 

Our Bitbucket pipeline was working fine, but in the past few days, it has started failing with the following error:

bash: docker: command not found

 

Runner Type: Self-hosted

Runner labels: self.hosted, linux

Runner version: current: 3.11.0

1 answer

1 vote
Jim Knepley - ReleaseTEAM
Atlassian Partner
March 27, 2025

Hi @Harshad Prajapati 

Taken at face value, that error indicates that the OS can't find the "docker" executable in the search path. Either the search path has changed and doesn't reference the location of the executable, or Docker isn't installed on the build instance.

Harshad Prajapati March 27, 2025

Thanks for the input. Could you suggest how I can debug this issue? Any specific checks or logs I should look into?

Harshad Prajapati March 27, 2025

Also, When I manually deploy by connecting to the machine, Docker works fine, and I don’t encounter this issue.

Jim Knepley - ReleaseTEAM
Atlassian Partner
March 27, 2025

First, find the docker binary. When you log in manually, use the "which docker" command to identify the full path that the executable is in.

In your pipeline, either update the path to include the directory where the docker executable is installed or reference docker by its full path name from above.

Harshad Prajapati March 27, 2025

Screenshot 2025-03-28 at 9.07.05 AM.png

Added Path as per screenshot 

 

End up with another errors

Screenshot 2025-03-28 at 9.08.06 AM.png

Jim Knepley - ReleaseTEAM
Atlassian Partner
March 28, 2025

What, exactly, did you add to the path?

All of those binaries on my Ubuntu 24 lab machine are in the /usr/bin directory. That's a very normal location for things to live in, so it's probably OK to include that in the path when running a pipeline.

Harshad Prajapati March 28, 2025

I've added screenshots already. PATH = /usr/bin/docker

Harshad Prajapati March 28, 2025

I've added /usr/bin as well as you suggest, but still same error 

Harshad Prajapati April 1, 2025

Any update ?

 

Jim Knepley - ReleaseTEAM
Atlassian Partner
April 1, 2025

I don't have anything more to add without hands-on troubleshooting.

Harshad Prajapati April 1, 2025

Thanks

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events