Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Distribute binaries for alpine / musl libc #4685

Closed
jordanst3wart opened this issue Nov 20, 2019 · 76 comments
Closed

[v2] Distribute binaries for alpine / musl libc #4685

jordanst3wart opened this issue Nov 20, 2019 · 76 comments
Labels
docker Issue involves the AWS CLI Docker container image feature-request A feature should be added or improved. installation p2 This is a standard priority issue v2

Comments

@jordanst3wart
Copy link

docker run -it --rm docker:latest sh
wget "https://d1vvhvl2y92vvt.cloudfront.net/awscli-exe-linux-x86_64.zip" -O "awscliv2.zip"
# curl not installed
unzip awscliv2.zip
./aws/install
# sudo not install

Errors with:

/ # ./aws/install
./aws/install: line 78: /aws/dist/aws2: not found
You can now run: /usr/local/bin/aws2 --version
/ # aws2
sh: aws2: not found
@jordanst3wart jordanst3wart changed the title not installing on docker image fails [v2] installing on docker image fails Nov 20, 2019
@jordanst3wart
Copy link
Author

I tried to debug the issue, and couldn't figure out why it fails. It seems to me the install script is just a bit flaky. I tried to add the v2 label as well.

@joguSD
Copy link
Contributor

joguSD commented Nov 20, 2019

The binaries we publish won't work on docker images based on alpine because we're compiling them against glibc. The sh: aws2: not found is what happens when you try to execute this binary. If you try it on an image like ubuntu:latest the installer will work.

Additionally, I don't think we'd ever release an alpine compatible binary like we're doing for our general linux binary. I think we'd be more inclined to just release a docker image that comes with our binary built on alpine.

@joguSD joguSD added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Nov 20, 2019
@jordanst3wart
Copy link
Author

Thanks for your answer. Is it possible to document that here https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html under "Prerequisites for Linux", or make the error more user friendly in the alpine based image case?

@no-response no-response bot removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Nov 21, 2019
@kyleknap
Copy link
Contributor

kyleknap commented Dec 3, 2019

We'll make sure to get this updated in the user guide. I also like the idea of making a more user friendly error message for this case.

@chadgrant
Copy link

@joguSD bummer, alpine is the standard for docker images. Especially with build / ci systems wanting to automate & not wanting to continually download very large docker images.

Can use an official alpine docker image in a multi stage build to copy the binary into another docker image though.

@ghost
Copy link

ghost commented Jan 7, 2020

@chadgrant - can you give an example please of your multi-stage dockerfile?

@chadgrant
Copy link

@BarakBD-Globality I do not have one but if the aws-alpine image ever gets created you can just do:

FROM aws_alpine_image:latest as aws
FROM alpine:latest
COPY --from=aws /usr/local/bin/binary /usr/local/bin/binary

@ghost
Copy link

ghost commented Jan 8, 2020

Too bad they don't support alpine. It is a standard image.

@jimbocoder
Copy link

Additionally, I don't think we'd ever release an alpine compatible binary like we're doing for our general linux binary. I think we'd be more inclined to just release a docker image that comes with our binary built on alpine.

@joguSD has there been any discussion or motion on this? It seems like a pretty big deal considering the prevalence of alpine. People like me use aws in their cicd and other automation, so if it's not available for alpine-based images, using version 2 is not even an option without significant work! Thanks.

@maxkoryukov
Copy link

also can't install in busybox

skyzyx added a commit to skyzyx/aws-cli-user-guide that referenced this issue Mar 27, 2020
Include information about awscli v2 not working in Alpine Linux as per aws/aws-cli#4685.
@NavidMitchell
Copy link

NavidMitchell commented Apr 16, 2020

Interestingly if you use this as a base image the AWS cli will install and work properly.

FROM adoptopenjdk/openjdk11:alpine

I was able to do this using the following Dockerfile

FROM adoptopenjdk/openjdk11:alpine

RUN apk add --no-cache \
		ca-certificates \
		unzip \
		curl \
		groff \
		less  \
		bash  \
		openssh-client

WORKDIR /home
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
    && unzip awscliv2.zip \
    && ./aws/install \
    && rm awscliv2.zip \
    && rm -R aws

@blagerweij
Copy link

blagerweij commented Apr 18, 2020

The reason that the adoptopenjdk image works is because they include the missing glibc libraries. Alphine linux is based on 'musl glibc', a light-weight alternative to a fullblown glibc. The aws cli v2 binaries do not work with musl, they need a few more libraries to work.

Instead of using the Java image, you can also use the Dockerfile below as an example how to run AWS CLI v2 on Alpine Linux:

FROM alpine:3.11

ENV GLIBC_VER=2.31-r0

# install glibc compatibility for alpine
RUN apk --no-cache add \
        binutils \
        curl \
    && curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \
    && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \
    && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk \
    && apk add --no-cache \
        glibc-${GLIBC_VER}.apk \
        glibc-bin-${GLIBC_VER}.apk \
    && curl -sL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip \
    && unzip awscliv2.zip \
    && aws/install \
    && rm -rf \
        awscliv2.zip \
        aws \
        /usr/local/aws-cli/v2/*/dist/aws_completer \
        /usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \
        /usr/local/aws-cli/v2/*/dist/awscli/examples \
    && apk --no-cache del \
        binutils \
        curl \
    && rm glibc-${GLIBC_VER}.apk \
    && rm glibc-bin-${GLIBC_VER}.apk \
    && rm -rf /var/cache/apk/*

The above will download the glibc libraries, download and install AWS CLI v2, and remove some stuff we probably don't need, such as auto-complete. The resulting image is about 100MB in size

@bentolor
Copy link

bentolor commented May 20, 2020

So what's the shortest path to get a aws ecr get-login-password … | docker login … inside a docker container running? (which implies: docker:dind )?

I'd love to avoid to build my own docker:stable image with docker:dind support. At least I could thanks to #4685 (comment) solution. Thanks for that!

@blagerweij
Copy link

@bentolor Since docker:dind also uses alpine, I suspect all you have to do is change the first line of the above mentioned Dockerfile. Instead of FROM alpine:3.11 you should use FROM docker:dind. It does mean you're building your own image, though....

bentolor pushed a commit to bentolor/docker-dind-awscli that referenced this issue May 25, 2020
@ChristophP
Copy link

thanks @blagerweij works really nicely

@bentolor
Copy link

bentolor commented May 25, 2020

Also thanks @blagerweij : I grasped the nettle and built a public, custom docker image by copy&pasting your solution: https://hub.docker.com/r/bentolor/docker-dind-awscli

@blagerweij
Copy link

@bentolor I noticed in your repo that your Dockerfile uses FROM docker:stable instead of FROM docker:dind. I thought the whole point was to create an image for Docker in Docker with AWS support ?

@bentolor
Copy link

@blagerweij See the image below from the official Docker image for illustration.

The typical usage is:

  1. One (or your ci) starts a docker:dind instance and then
  2. Starts a separate docker:stable instance which is linked to the started docker:dind container
  3. You start executing docker commands inside the second container which redirects the comamnds via socket connection to docker daemon running inside the first docker:dind container.

Therefore: While it's true that the docker:dind instance eventually executes your Docker commands, your CLI frontend actually lives in a docker:stable instance. And that's the place where one i.e. needs to login into AWS ;-)

At least this is the usage pattern I'm aware of (i.e. on using Gitlab CI to build docker images). Maybe there are also direct docker:dind usage scenarios?

Usage of docker:stable vs. docker:didn

@vedant-khandelwal
Copy link

One may use alpine image with glibc from https://hub.docker.com/r/frolvlad/alpine-glibc/
and install aws cli following steps from aws documentation. Worked for me.

@jurgen-weber-deltatre
Copy link

jurgen-weber-deltatre commented Sep 14, 2022

Tis is now failing on 2.7.31 and 2.7.30

  inflating: aws/dist/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so
  inflating: aws/dist/lib-dynload/_pickle.cpython-39-x86_64-linux-gnu.so
  inflating: aws/dist/lib-dynload/unicodedata.cpython-39-x86_64-linux-gnu.so
+ ./aws/install --bin-dir /aws-cli-bin
Traceback (most recent call last):
  File "aws", line 19, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/clidriver.py", line 20, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/session.py", line 27, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/client.py", line 16, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/waiter.py", line 17, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/docs/__init__.py", line 15, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/docs/service.py", line 15, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/docs/paginator.py", line 13, in <module>
ImportError: cannot import name 'xform_name' from 'botocore' (unknown location)
[12] Failed to execute script 'aws' due to unhandled exception!
You can now run: /aws-cli-bin/aws --version
+ /aws-cli-bin/aws --version
Traceback (most recent call last):
  File "aws", line 19, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/clidriver.py", line 20, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/session.py", line 27, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/client.py", line 16, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/waiter.py", line 17, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/docs/__init__.py", line 15, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/docs/service.py", line 15, in <module>
  File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
  File "awscli/botocore/docs/paginator.py", line 13, in <module>
ImportError: cannot import name 'xform_name' from 'botocore' (unknown location)
[1] Failed to execute script 'aws' due to unhandled exception!

Looking at a few places I use this, the last successful version/build is:

$ aws --version
aws-cli/2.7.27 Python/3.9.13 Linux/5.10.130 exe/x86_64.alpine.3 prompt/off

I have tried running through every versiuon and 2.7.28 and 2.7.29 give me a new error

+ ./aws/install --bin-dir /aws-cli-bin

No module named 's3transfer.crt'
You can now run: /aws-cli-bin/aws --version
+ /aws-cli-bin/aws --version

No module named 's3transfer.crt'
The command '/bin/sh -c set -ex;     unzip /aws/dist/awscli-exe.zip;     ./aws/install --bin-dir /aws-cli-bin;     /aws-cli-bin/aws --version' returned a non-zero code: 255

Which makes 2.7.27 the last stable/working version.

@blagerweij
Copy link

I encountered the same. Everything was fine up to 2.7.29. Things started to break since 2.7.30 and 2.7.31. Version 2.7.32 seems to have fixed the issue, although I'm still clueless on the botocore xform_name error message, and how the changes could affect this. PyInstaller has been upgraded to version 5.2, probably that's the root cause. But I can't find any obvious bugfix in 2.7.32, yet it seems to work. 🤷
On a more positive note: Since the main branch has updated PyInstaller to 5.2, we can remove the 'sed' line where the version is changed.

avrittrohwer added a commit to civiform/cloud-deploy-infra that referenced this issue Oct 11, 2022
aws-cli expects glibc shared objects which are not present on alpine.

Alternatives considered:

1. Adding gcompat to the apk add list.  The aws-cli still linked against
   missing shared objects.
1. Add missing shared objects manually like in
   aws/aws-cli#4685 (comment).
   This approached seems very brittle so I opted to use non-alpine
   images instead.
@tim-finnigan tim-finnigan added the p2 This is a standard priority issue label Nov 14, 2022
@Hazzard17h
Copy link

Based off @blagerweij glibc solution, I've started using this that works with the latest alpine image (not just 3.13) and can also install a specific awscli version (not just the latest)

Dockerfile:

FROM alpine:3.14.2

ENV AWSCLI_VERSION=2.2.41
ENV GLIBC_VER=2.31-r0

RUN apk add --update --no-cache \
  groff

RUN apk add --no-cache --virtual .dependencies binutils curl \
    && curl -sL https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \
    && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-${GLIBC_VER}.apk \
    && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk \
    && curl -sLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk \
    && apk add --no-cache --virtual .glibc \
        glibc-${GLIBC_VER}.apk \
        glibc-bin-${GLIBC_VER}.apk \
        glibc-i18n-${GLIBC_VER}.apk \
    && /usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8 \
    && curl -sL https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${AWSCLI_VERSION}.zip -o awscliv2.zip \
    && unzip awscliv2.zip \
    && aws/install \
    && rm -rf \
        awscliv2.zip \
        aws \
        /usr/local/aws-cli/v2/*/dist/aws_completer \
        /usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \
        /usr/local/aws-cli/v2/*/dist/awscli/examples \
        glibc-*.apk \
    && apk del --purge .dependencies
❯ docker build -t awscli-test .
❯ docker run -it awscli-test sh
/ # aws --version
aws-cli/2.2.41 Python/3.8.8 Linux/5.10.47-linuxkit exe/x86_64.alpine.3 prompt/off

I found that this also works for:

FROM alpine:3.17.2

ENV AWSCLI_VERSION=2.10.2
ENV GLIBC_VER=2.34-r0

But not with GLIBC_VER=2.35-r0, and must add --force-overwrite in the apk add command that install glibc due to this sgerrand/alpine-pkg-glibc#185 (comment)

@blagerweij
Copy link

This thread is quite outdated: AWS CLI v2.10 has now proper support for Alpine / libmusl :

ARG ALPINE_VERSION=3.17
FROM python:3.10-alpine${ALPINE_VERSION} as builder

ARG AWS_CLI_VERSION=2.10.0
RUN apk add --no-cache git unzip groff build-base libffi-dev cmake
RUN git clone --single-branch --depth 1 -b ${AWS_CLI_VERSION} https://github.com/aws/aws-cli.git

WORKDIR aws-cli
RUN ./configure --with-install-type=portable-exe --with-download-deps
RUN make
RUN make install

# reduce image size: remove autocomplete and examples
RUN rm -rf \
    /usr/local/lib/aws-cli/aws_completer \
    /usr/local/lib/aws-cli/awscli/data/ac.index \
    /usr/local/lib/aws-cli/awscli/examples
RUN find /usr/local/lib/aws-cli/awscli/data -name completions-1*.json -delete
RUN find /usr/local/lib/aws-cli/awscli/botocore/data -name examples-1.json -delete
RUN (cd /usr/local/lib/aws-cli; for a in *.so*; do test -f /lib/$a && rm $a; done)

# build the final image
FROM alpine:${ALPINE_VERSION}
COPY --from=builder /usr/local/lib/aws-cli/ /usr/local/lib/aws-cli/
RUN ln -s /usr/local/lib/aws-cli/aws /usr/local/bin/aws

As you can see, we can use 'configure', 'make' and 'make install'. The above Dockerfile removes some 'nice to have' stuff such as autocomplete, documentation, etc.

@skyzyx
Copy link
Contributor

skyzyx commented Feb 27, 2023

That's great! I was waiting for someone from AWS to update this thread appropriately. I haven't touched this for a while since I was still waiting, but let me try rebuilding.

For cases like mine where we build and package things in CI, push them into a Linux repo, then have users install from the Linux repo — Does anyone know off the top of their head of there are make or ./configure changes that allow building in a different path/directory from where it will ultimately be installed?

IIRC, there was a time when this was not supported by this project. (But TBH, I might be thinking of something else.)

@jonemo
Copy link
Contributor

jonemo commented Feb 28, 2023

The AWS CLI team recently published documentation for building CLI v2 from source here: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-source-install.html This contains a section "Alpine Linux container".

@samypr100
Copy link

samypr100 commented Mar 4, 2023

Thanks for the update, it works nicely when building from source now without any gimmicks.

Since the OP asked for pre-built distribution of alpine binaries, are there any future plans to get an official distribution in alpine?

@tuananh
Copy link

tuananh commented Mar 20, 2023

The AWS CLI team recently published documentation for building CLI v2 from source here: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-source-install.html This contains a section "Alpine Linux container".

I just tested this. it works, however the image is 380MB. the docs says it's abt 150MB. 380MB is on par with the official amazonlinux2 based image (386MB)

I only change version to latest (2.11.4) because the old link is broken.

@blagerweij
Copy link

blagerweij commented Mar 20, 2023

Please check the SO answer here: https://stackoverflow.com/a/61268529/1704634
The compressed image size is about 36Mb, uncompressed about 136Mb with Alpine 3.17 / Python 3.11. This is assuming you're using the 'portable-exe' option, otherwise you're pulling in a bunch of Python3 dependencies.

Using Alpine 3.15 and Python 3.10 you can save a bit more (size is 108Mb). If you're really desperate to reduce the image size, you could consider to only keep the botocore data-files for the most commonly used services (ec2, s3, etc), since the botocore folder is about 70Mb. But I would recommend against doing that. But removing auto_completer and the examples helps a bit.

Regarding the alpine package: Please see this commit: https://gitlab.alpinelinux.org/alpine/aports/-/commit/aa039cf358500ac471ba9f82529dba0c0fdc2887

Support is coming, although the Alpine devs decided to use the Python3 dependencies instead of using the portable-exe. The portable-exe is about 100Mb, using Python3 dependencies adds about 300Mb to your image.

@isuftin
Copy link

isuftin commented Mar 24, 2023

I also followed https://docs.aws.amazon.com/cli/latest/userguide/getting-started-source-install.html and it works for more recent versions..

FROM our.registry/alpine-python:3.10 AS builder

ARG INSTALL_VERSION=2.11.5

SHELL ["/bin/ash", "-eo", "pipefail", "-c"]

WORKDIR /target

# Grab install dependencies
RUN apk add --no-cache \
  curl~=7.83 \
  make~=4.3 \
  cmake~=3.23 \
  gcc~=11.2.1 \
  g++~=11.2.1 \
  libc-dev~=0.7.2 \
  libffi-dev~=3.4.2 \
  openssl-dev~=1.1.1 \
  \
  && curl https://awscli.amazonaws.com/awscli-${INSTALL_VERSION}.tar.gz | tar -xz --strip-components 1 \
  && ./configure --with-download-deps --with-install-type=portable-exe \
  && make && make install \
  \
  && rm -rf \
  /usr/local/lib/aws-cli/aws_completer \
  /usr/local/lib/aws-cli/awscli/data/ac.index \
  /usr/local/lib/aws-cli/awscli/examples && \
  find /usr/local/lib/aws-cli/awscli/data -name 'completions-1*.json' -delete && \
  find /usr/local/lib/aws-cli/awscli/botocore/data -name 'examples-1.json' -delete

This works fine. However, if I try 2.9.23, that tar.gz isn't found @ https://awscli.amazonaws.com

So this has me a bit worried that this process is a bit fragile since we do rebuild historic images every now and again to patch OS level vulnerabilities while keeping the version the same.

Anyone have any thoughts on where a perm base for the source for historic versions might be found?

@vsimon
Copy link

vsimon commented Mar 24, 2023

One thought is that support for Alpine / libmusl started happening with v2.10 going forward so I wouldn't think 2.9.x and lower would be supported or these tar.gz files would be available in the same manner as the new versions.

@blagerweij
Copy link

From version v2.9.x they started to support Alpine/libmusl, however since v2.10 the build-system has been changed to use configure / make / make install, and use Python libraries (next to portable-exe).

Regarding the source tar.gz files: you could consider to use the git tags:
RUN git clone --single-branch --depth 1 -b ${AWS_CLI_VERSION} https://github.com/aws/aws-cli.git

@isuftin
Copy link

isuftin commented Mar 27, 2023

@vsimon - That makes sense. In-house, we're deprecating 2.9 in April so I guess we'll continue to build as we've been building w/ glibc in Alpine until then. Once we move off of 2.9, we'll switch our Dockerfiles to using configure/make/make install. What I didn't want was a separate build process for 2.9 and then everything else.

@blagerweij - I did try that last week, but the source in github doesn't contain the configure/make/make install content that I'm interested in. It contains the install binary. That's what we use today, pulling it down from https://awscli.amazonaws.com/awscli-exe-linux-x86_64-${INSTALL_VERSION}.zip.

Thanks for both of your comments.

@wsalles
Copy link

wsalles commented Jul 11, 2023

for those who are still having issues (like I was) and are having to do the installation procedure using make install and so on to install aws-cli v2, know that we have already been available since July 7th the package of aws-cli version 2.13.0 in Alpine 3.18 :
https://alpine.pkgs.org/3.18/alpine-community-x86_64/aws-cli-2.13.0-r0.apk.html

Build date: 2023-07-07 22:24:15
Git commit: 5c9b600aeb2eb1e6131cf47379ae2ffee5317933

So, you just need to do:

apk update
apk add aws-cli

or if you want to specific a version like me, use: apk add "aws-cli=2.13.0-r0"

output:

/ # apk add "aws-cli=2.13.0-r0"
(1/62) Installing libbz2 (1.0.8-r5)
(2/62) Installing libexpat (2.5.0-r1)
(3/62) Installing libffi (3.4.4-r2)
(4/62) Installing gdbm (1.23-r1)
(5/62) Installing xz-libs (5.4.3-r0)
(6/62) Installing libgcc (12.2.1_git20220924-r10)
(7/62) Installing libstdc++ (12.2.1_git20220924-r10)
(8/62) Installing mpdecimal (2.5.1-r2)
(9/62) Installing ncurses-terminfo-base (6.4_p20230506-r0)
(10/62) Installing libncursesw (6.4_p20230506-r0)
(11/62) Installing libpanelw (6.4_p20230506-r0)
(12/62) Installing readline (8.2.1-r1)
(13/62) Installing sqlite-libs (3.41.2-r2)
(14/62) Installing python3 (3.11.4-r0)
(15/62) Installing python3-pycache-pyc0 (3.11.4-r0)
(16/62) Installing pyc (0.1-r0)
(17/62) Installing py3-certifi (2023.5.7-r0)
(18/62) Installing py3-certifi-pyc (2023.5.7-r0)
(19/62) Installing py3-cparser (2.21-r2)
(20/62) Installing py3-cparser-pyc (2.21-r2)
(21/62) Installing py3-cffi (1.15.1-r3)
(22/62) Installing py3-cffi-pyc (1.15.1-r3)
(23/62) Installing py3-cryptography (40.0.2-r1)
(24/62) Installing py3-cryptography-pyc (40.0.2-r1)
(25/62) Installing py3-six (1.16.0-r6)
(26/62) Installing py3-six-pyc (1.16.0-r6)
(27/62) Installing py3-dateutil (2.8.2-r3)
(28/62) Installing py3-dateutil-pyc (2.8.2-r3)
(29/62) Installing py3-distro (1.8.0-r2)
(30/62) Installing py3-distro-pyc (1.8.0-r2)
(31/62) Installing py3-colorama (0.4.6-r3)
(32/62) Installing py3-colorama-pyc (0.4.6-r3)
(33/62) Installing py3-docutils (0.19-r4)
(34/62) Installing py3-docutils-pyc (0.19-r4)
(35/62) Installing py3-jmespath (1.0.1-r1)
(36/62) Installing py3-jmespath-pyc (1.0.1-r1)
(37/62) Installing py3-urllib3 (1.26.15-r1)
(38/62) Installing py3-urllib3-pyc (1.26.15-r1)
(39/62) Installing py3-wcwidth (0.2.6-r2)
(40/62) Installing py3-wcwidth-pyc (0.2.6-r2)
(41/62) Installing py3-prompt_toolkit (3.0.38-r1)
(42/62) Installing py3-prompt_toolkit-pyc (3.0.38-r1)
(43/62) Installing py3-ruamel.yaml.clib (0.2.7-r1)
(44/62) Installing py3-ruamel.yaml (0.17.32-r0)
(45/62) Installing py3-ruamel.yaml-pyc (0.17.32-r0)
(46/62) Installing aws-cli-pyc (2.13.0-r0)
(47/62) Installing py3-awscrt-pyc (0.16.24-r0)
(48/62) Installing python3-pyc (3.11.4-r0)
(49/62) Installing aws-c-common (0.8.23-r0)
(50/62) Installing aws-c-cal (0.6.0-r0)
(51/62) Installing aws-c-compression (0.2.17-r0)
(52/62) Installing s2n-tls (1.3.45-r0)
(53/62) Installing aws-c-io (0.13.28-r0)
(54/62) Installing aws-c-http (0.7.11-r0)
(55/62) Installing aws-c-sdkutils (0.1.11-r0)
(56/62) Installing aws-c-auth (0.7.0-r0)
(57/62) Installing aws-checksums (0.1.16-r0)
(58/62) Installing aws-c-event-stream (0.3.1-r0)
(59/62) Installing aws-c-mqtt (0.8.14-r0)
(60/62) Installing aws-c-s3 (0.3.13-r0)
(61/62) Installing py3-awscrt (0.16.24-r0)
(62/62) Installing aws-cli (2.13.0-r0)
Executing busybox-1.36.1-r0.trigger
OK: 175 MiB in 77 packages

/ # aws --version
aws-cli/2.13.0 Python/3.11.4 Linux/5.15.49-linuxkit-pr source/x86_64.alpine.3 prompt/off

/ # which aws
/usr/bin/aws

I hope I helped someone with this news 👍

@jordanst3wart
Copy link
Author

apk update
apk add aws-cli

I feel like this issue can be closed now.

@tim-finnigan
Copy link
Contributor

Thanks @jordanst3wart — closing this per comments above and will highlight this comment again for visibility:

The AWS CLI team recently published documentation for building CLI v2 from source here: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-source-install.html This contains a section "Alpine Linux container".

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker Issue involves the AWS CLI Docker container image feature-request A feature should be added or improved. installation p2 This is a standard priority issue v2
Projects
None yet
Development

No branches or pull requests