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

Alpine 3.20 release #8689

Closed
cyprianbergoniatmo opened this issue May 23, 2024 · 10 comments
Closed

Alpine 3.20 release #8689

cyprianbergoniatmo opened this issue May 23, 2024 · 10 comments
Assignees
Labels
installation p2 This is a standard priority issue source-distribution cli v2 source distritbution related issues

Comments

@cyprianbergoniatmo
Copy link

Describe the issue

Alpine 3.20 does not have a aws-cli release. 3.20 is now the latest release and many repositories use the alpine:latest docker image and will try to install aws-cli.

Additional Information/Context

See description

CLI version used

N/A

Environment details (OS name and version, etc.)

alpine 3.20

@cyprianbergoniatmo cyprianbergoniatmo added needs-triage This issue or PR still needs to be triaged. source-distribution cli v2 source distritbution related issues labels May 23, 2024
@MutatedBread
Copy link

MutatedBread commented May 24, 2024

Hello 👋 seeing there's no aws-cli in alpine 3.20 and traced to this issue. Not sure if this is the right outlet to ask, can we ask for help to release aws-cli for alpine 3.20?

@EricWorrall
Copy link

I found a workaround for the missing awscli on alpine issue (tested on node-18:alpine).

apk add --no-cache curl
apk add --no-cache make
apk add --no-cache cmake
apk add --no-cache gcc
apk add --no-cache g++
apk add --no-cache libc-dev
apk add --no-cache libffi-dev
apk add --no-cache openssl-dev
apk add --no-cache python3
python3 -m venv ~/.environment
source ~/.environment/bin/activate
pip install awscli
deactivate

Then keep the environment deactivated, but reactivate the .environment whenever you need to use an aws command.
source ~/.environment/bin/activate
aws ... <- aws commands
deactivate

Obviously use apk del on all the extra packages and rm -rf the .environment directory once you are done.

I'm not sure if the curl, make, etc. are required, just adding python3 might work, but it's been a long day so I froze the script changes the first time I made it work - they were first added when I was trying to install and build the awscli apk.

I needed venv because the alpine docker container was fussy about installing packages from sources other than the repository - but I'm not sure whether this applies to all containers.

@fossdd
Copy link

fossdd commented May 24, 2024

Alpine disabled aws-cli on 3.20 because of missing Python 3.12 compat (tracked at #8342). If you use :latest, make sure to always read the release notes before upgrading: https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.20.0

@MutatedBread
Copy link

Alpine disabled aws-cli on 3.20 because of missing Python 3.12 compat (tracked at #8342). If you use :latest, make sure to always read the release notes before upgrading: wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.20.0

Got it, thanks for the info 🙏

@tim-finnigan tim-finnigan self-assigned this May 24, 2024
@tim-finnigan tim-finnigan added the investigating This issue is being investigated and/or work is in progress to resolve the issue. label May 24, 2024
@tim-finnigan
Copy link
Contributor

Thanks for reporting — as mentioned above, #8342 is the tracking issue for Python 3.12 support in v2. Some additional testing is still required for 3.12 but I've informed the team about this Alpine issue.

@tim-finnigan tim-finnigan added installation p2 This is a standard priority issue and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. needs-triage This issue or PR still needs to be triaged. labels May 24, 2024
@tim-finnigan tim-finnigan removed their assignment May 24, 2024
@fossdd
Copy link

fossdd commented May 26, 2024

For now I enabled aws-cli in Alpine v3.20 again with a couple of patches, but stable official Python 3.12 support would be great.

@MutatedBread
Copy link

hey @fossdd, that's great to hear! will there be any caveats if we use aws-cli on Alpine v3.20?

@fossdd
Copy link

fossdd commented May 27, 2024

No, everything should work as intended. :)

@tim-finnigan
Copy link
Contributor

Please refer to the documentation to Build and install the AWS CLI from source for this use case. As noted there, Alpine Linux uses musl, but the current installers require glibc causing the pre-built installers to not immediately work. But this approach works for me:

FROM python:3.11-alpine3.20 AS builder

ENV AWSCLI_VERSION=2.17.21

RUN apk add --no-cache \
    curl \
    make \
    cmake \
    gcc \
    g++ \
    libc-dev \
    libffi-dev \
    openssl-dev \
    && curl https://awscli.amazonaws.com/awscli-${AWSCLI_VERSION}.tar.gz | tar -xz \
    && cd awscli-${AWSCLI_VERSION} \
    && ./configure --prefix=/opt/aws-cli/ --with-download-deps \
    && make \
    && make install

FROM python:3.11-alpine3.20

RUN apk --no-cache add groff

COPY --from=builder /opt/aws-cli/ /opt/aws-cli/

ENTRYPOINT ["/opt/aws-cli/bin/aws"]

We advise caution on using any third-party installation distributions that are not officially maintained by AWS. Also we are continuing to track #8342 for Python 3.12 support on v2.

Copy link

github-actions bot commented Aug 6, 2024

This issue is now closed. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation p2 This is a standard priority issue source-distribution cli v2 source distritbution related issues
Projects
None yet
Development

No branches or pull requests

5 participants