Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeBuild /codebuild/output/tmp/script.sh: docker: not found

I am using AWS CodeBuild to build my application. I am using example build spec file as given here: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example I have already uploaded my custom Docker image to AWS ECR having requisites to build my application (Java/Scala based). I get following error:

Reading package lists...
 [Container] 2018/10/26 10:40:07 Running command echo Entered the install phase...
Entered the install phase...
 [Container] 2018/10/26 10:40:07 Running command docker login -u AWS -p
..... 
/codebuild/output/tmp/script.sh: 4: /codebuild/output/tmp/script.sh: docker: not found

Why should I get this error ? AWS CodeBuild is supposed to download this Docker image from ECR and then follow the instructions that I provide in the build spec file for building my application.

like image 678
NKM Avatar asked Sep 23 '26 18:09

NKM


2 Answers

The example build.spec file assumes that your build image has Docker already installed. I was assuming "wrongly" that CodeBuild will install/configure Docker tools inside the image automatically.

like image 103
NKM Avatar answered Sep 25 '26 09:09

NKM


Issue looks similar to AWS CodeBuild - docker: not found. I can't paste the same response to this question. So, please check my response there on how to enable Docker inside your build container to see if that solves your issue.

like image 43
Subin Mathew Avatar answered Sep 25 '26 08:09

Subin Mathew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!