1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker ubuntu コンテナ内に AWS CLI をインストールする

Posted at

背景

ubuntu コンテナ内で AWS CLI v2 をインストールする際にハマりました。今後のためにメモとして残しておきます。

インストール

以下のコマンドを順に実行します。

sudo apt-get update
sudo apt-get install ca-certificates
sudo apt-get install curl
sudo apt-get install unzip
sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo unzip awscliv2.zip
sudo ./aws/install -i /usr/local/aws-cli -b /usr/bin

または Dockerfile に以下を記述し、イメージのビルド時にインストールします。

Dockerfile
RUN sudo apt-get update && sudo apt-get install -y \
    ca-certificates \
    curl \
    unzip \
 && sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
 && sudo unzip awscliv2.zip \
 && sudo ./aws/install -i /usr/local/aws-cli -b /usr/bin

参考記事

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?