• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

securitywing

How to Install AWS CLI and Terraform in Jenkins Docker Container

by wing

To install a AWS CLI in a Jenkins running on a docker container, you can follow the below steps. But it would be better if you create  a custom  Jenkins docker file with AWS CLI and then create a custom image to spin up the Jenkins container. But sometimes, you may need to install various packages.

 

Install AWS CLI in Jenkins Docker Container

  1. Take a note of the running Jenkins containers and then run to login as a root

         docker exec -u 0 -it 85f0af1f40e4 bash

  1. Next, update the packages list:

         apt-get update

  1. Download AWS CLI zip file from AWS.

       curl “https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip” -o “awscliv2.zip”

  Reference:  updating the lastest version of AWS CLI

     4   Unzip the package

         unzip awscliv2.zip

  1. Install the AWS CLI by running the script

       ./aws/install

    6. Check if the AWS CLI  has been installed properly.

                aws –version

 

Install Terraform in Jenkins Docker Container

apt-get install -y lsb-release
apt install -y curl
lsb_release -a
apt-get install -y software-properties-common

curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add –
apt-add-repository “deb [arch=$(dpkg –print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main”

apt update
apt install terraform

 

Test that Terraform has been installed correctly:

     terraform -version

 

Related posts:

  1. Top 10 Reasons Why AWS ECS is Better than Kubernetes
  2. 5 Steps to Setup a Nexus3 repository using Docker on Virtual Box.
  3. How to Enable Backend Access to AWS Fargate Container Using ECS EXEC
  4. How to Upgrade AWS CDK to Minor version

Filed Under: AWS, Containers

Primary Sidebar

Please help us sharing

Categories

  • AWS
  • Basics
  • Containers
  • Cryptocurrency
  • Cyber
  • Internet Security and Safety
  • IS Audit
  • IT Security Exams
  • Law & Human Rights
  • Network Security Tips
  • Off Track
  • Social Media Governance
  • Tech Comparisons
  • Tech Stack Suitability
  • Telecom
  • Tutorial

CISSP Sample Test

Take a CISSP Sample Test

CISA Sample Test

CISA IT governance Sample test

Please Follow Us

Contact us for Ads

Go to Contact Form

Search

Footer

Copyrights

Protected by Copyscape Duplicate Content Detection Software

Securitywing.com reserves the copyrights of all of its published articles.No contents of this site is permitted to be published to anywhere else in the Internet.If any contents are found in any other websites, securitywing reserves the rights to file a DMCA complaint. But you have the right to use the link of any relevant article of this site to point from your website if you consider that it might improve the quality of your article.

Tags

audit AWS backup basics browser check cisco cloud computer configuration cyber data database email gmail hsrp ids iis informaiton internet kubernetes linux load balancing malware microsoft network protection redundancy risk router security security tips server social media SSL switch test tools vpn vrrp web webserver website windows wordpress

Copyright © 2010-2025 ·All Rights Reserved · SecurityWing.com