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

aws-cli (no such package) in 3.20 #396

Closed
gabrielcanepascalar opened this issue May 22, 2024 · 14 comments
Closed

aws-cli (no such package) in 3.20 #396

gabrielcanepascalar opened this issue May 22, 2024 · 14 comments

Comments

@gabrielcanepascalar
Copy link

The following Dockerfile fails:

FROM alpine:3

RUN apk --update --no-cache add git aws-cli

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

with

 > [2/3] RUN apk --update --no-cache add git aws-cli:
0.562 fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
2.834 fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
3.715 ERROR: unable to select packages:
3.715   aws-cli (no such package):
3.715     required by: world[aws-cli]
------
Dockerfile:3
--------------------
   1 |     FROM alpine:3
   2 |     
   3 | >>> RUN apk --update --no-cache add git aws-cli
   4 |     
   5 |     COPY entrypoint.sh /entrypoint.sh
--------------------
ERROR: failed to solve: process "/bin/sh -c apk --update --no-cache add git aws-cli" did not complete successfully: exit code: 1

It looks like aws-cli is missing from the 3.20 package index. Pinning to 3.19 solves the issue.

@fossdd
Copy link

fossdd commented May 22, 2024

aws-cli got disabled in Alpine 3.20 due to missing Python 3.12 compat. https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.20.0#aws-cli

komuw added a commit to komuw/kubectl that referenced this issue May 23, 2024
- alpine 3.20 was released some hours ago.
  When you use that version, it is unable to install aws-cli. This is because aws-cli got disabled in Alpine 3.20 due to missing Python 3.12 compat.

See alpinelinux/docker-alpine#396 for more details.
@djsd123
Copy link

djsd123 commented May 23, 2024

In our case we're using the bash image which is based on Alpine. Worked around this by pinning to a previous version.

image: bash:5.2.26-alpine3.19@sha256:890897682a8025c1e178b5ec6126b3b532ad8535f1e81dbf60bc2b7300b1bcf8

or

From bash:5.2.26-alpine3.19@sha256:890897682a8025c1e178b5ec6126b3b532ad8535f1e81dbf60bc2b7300b1bcf8

@gabrielcanepascalar
Copy link
Author

Great ideas, @djsd123 and @fossdd. For the time being, we've pinned the image version to 3.19 while we wait for this issue to be fixed permanently.

close1-mrnf added a commit to dgri-mrnf-cloud-nuage/sync-up-to-codecommit-action that referenced this issue May 23, 2024
retour à la version 3.19. La nouvelle version 3.20 :
aws-cli got disabled in Alpine 3.20 due to missing Python 3.12 compat.
alpinelinux/docker-alpine#396
@fossdd
Copy link

fossdd commented May 23, 2024

Yes, we'll add aws-cli again once upstream fixed the issue. Hopefully this is soon.

@arel
Copy link

arel commented May 23, 2024

FYI, docker:latest (and docker:dind and the other docker:* images I tested) updated their dependency to alpine 3.20, breaking all our automated build processes that depended on the now missing aws-cli package.

I tried several things but ended up installing aws-cli with pip as a workaround (but this is aws cli v1, so your mileage may vary).

apk add python3 py3-pip
pip3 install awscli --upgrade --break-system-packages

Was this not considered a breaking change?

@AntonOellerer
Copy link

AntonOellerer commented May 23, 2024

docker:26.1.3-dind-alpine3.19 does the deal for me

@fossdd
Copy link

fossdd commented May 23, 2024

Was this not considered a breaking change?

Well, yes. Disabling packages is not very nice, but there is no other option. The best we could do is to inform people about that via the release notes.

@mahavirdarbar
Copy link

The same problem is plaguing me today; gitlab pipelines suddenly stopped working. I eventually found this link. It now functions properly after switching to V3.9. The package should not be removed from the repository in this manner.

@fossdd
Copy link

fossdd commented May 24, 2024

It has to, otherwise it tries to access python packages which do not exist for it's python version. The alternative would be to package Python 3.11 on the side with all python packages, which is too much hassle for aws-cli.

If you use :latest or :3 you have to know that this may break. (Usually it's fine and probably better to have the latest Alpine version, but you have to know the conseqeunces)

@berkayalan
Copy link

alpine:3.19.1 directly worked for me.

@darioackermann
Copy link

In case you're here because your pipeline broke, here are some useful pin patterns :)

  • python:alpine3.19
  • python:3.11-alpine3.19
  • node:lts-alpine3.19
  • node:20-alpine3.19
  • docker:26.1.3-alpine3.19
  • docker:26.1.3-dind-alpine3.19

@KorvinSzanto
Copy link

kodiakhq bot pushed a commit to cloudquery/cloudquery that referenced this issue May 24, 2024
#### Summary

To avoid issues like alpinelinux/docker-alpine#396
I'll add a renovate config to handle updates via PRs
pasha-codefresh added a commit to argoproj-labs/argocd-image-updater that referenced this issue May 25, 2024
jannfis pushed a commit to argoproj-labs/argocd-image-updater that referenced this issue May 25, 2024
@fossdd
Copy link

fossdd commented May 26, 2024

Good news! I have enabled and upgraded aws-cli in Alpine v3.20 by adding a bunch of patches. This is not a nice solution, but I think it's better than disabling it.

@ncopa
Copy link
Contributor

ncopa commented Jun 21, 2024

We don't ship aws-cli with the alpine docker image so this should be reported and followed up on https://gitlab.alpinelinux.org/alpine/aports

sribiere-jellysmack pushed a commit to sribiere-jellysmack/argocd-image-updater that referenced this issue Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants