Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running AWS Command Line Interface using Jenkins installed through Docker: command not found?

When running aws from Jenkins pipeline I have the following error message: command not found - which aws returns command not found.

By other hand, when running aws from a single job it works - which aws returns /usr/local/bin/aws.

Do you have any idea why this is happening?

Thank you.

like image 254
jcunhafonte Avatar asked Oct 27 '25 06:10

jcunhafonte


1 Answers

You still need to install the AWS CLI inside the docker container.

# Swap to root user to install AWS CLI then switch back to jenkins user
USER root
RUN apt-get update
RUN apt-get install -y awscli
USER jenkins
like image 159
Loaf Avatar answered Oct 29 '25 02:10

Loaf