-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
An official Docker Image with the AWS CLI for use in CI/CD scenarios #3553
Comments
I am here because I too am looking for an official aws-cli docker image to use in my CI/CD environment. Instead I am now going to create ANOTHER pipeline to build a docker image which includes the aws cli when I could just reference the official one in my original pipeline. Also...someone else gets it too https://hub.docker.com/r/google/cloud-sdk. |
Isn't +1 considered harmful ;) Anyway this is the third (?) issue created about this... |
👍 add my +1 I have to create my own docker image to only include awsCLI in my CI. I would prefere an official one |
+1 |
8 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
This comment has been minimized.
This comment has been minimized.
@justnance enough? |
+1 |
3 similar comments
+1 |
+1 |
+1 |
Another reason is when using an OS like coreOS that has no package management the idiomatic way of running things is via a container. I'm surprised the need for this would even be questioned, is an obvious omission. 👍 +1 |
👍 |
5 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
As the opener of #3291 (the earliest of the three quoted Issues lol), I'm glad to see that this issue is finally gaining traction. To all future responders, when @justnance says "Please +1 it to show interest", he means add a like on the first comment, that's the proper way to +1 things on GitHub so that you're not spamming the maintainers' mailboxes. |
This doesn't look like well maintained, but here's another one |
I have just spotted this into the wild: https://hub.docker.com/r/amazon/aws-cli It seems that it's finally here :) |
@pablosjv it is not an official or certified image. Be aware of that. |
@anjakammer It seems it's an official amazon image, even though it's not an official image published by Docker. I don't know if it's production ready tough, because they said nothing in this issue yet. |
Curious how this AWS image is 98.42 MB whereas others (e.g. atlassian/pipelines-awscli) are much smaller. |
CLI team member here. Yep I can confirm we have officially launched a Docker image for the AWS CLI v2! I recommend reading the following:
I'm going to close out this issue. If you have feedback or questions about the image, please open another GitHub issue in this repository. |
As opener of the original issue #3291, those many years ago, my aching ❤️ is filled with such joy to see my concerns finally validated, and an official Docker image now available. Pot shots about how long it took to make this image aside, I'm sure this was much easier said than done, so a big thanks to the Amazon devs who made this happen. You all do excellent work. 👏🎉👏 Okay Alexa, I thanked them, please let my family go now. |
Is the |
@zerkms Aha, found it in the |
I guess they are finally doing it, but I couldn't get it to run on Gitlab CI https://hub.docker.com/r/amazon/aws-cli I'm instead using Gitlab's AWS CLI docker image, and it works perfectly. Just use image: registry.gitlab.com/gitlab-org/cloud-deploy:latest UPDATE: The above image is deprecated, use the new one instead. image: registry.gitlab.com/gitlab-org/cloud-deploy/aws-base:latest |
Note that to use the image on GitLab CI, you will need to manually set an empty entrypoint, as the image:
name: amazon/aws-cli
entrypoint: [""] |
@mikesir87 why's that? |
@psnehanshu I think that's because you run the image as if it was the cli itself, like |
@lucasbasquerotto I have settled for Gitlab's image anyway. Anyway, thanks for the explanation. |
In case anyone is still interested to get AWS CLI v2 working on Alpine Linux, here's an example Dockerfile:
The problem was that AWS CLI v2 uses GLIBC, but Alpine Linux has limited GLIBC support (it uses 'musl', a light-weight alternative). The Dockerfile above installs the missing glibc libraries, and uses a multi-stage Dockerfile to keep the final image small. With a bit of effort, we can probably reduce the image size even further by only including the files from /usr/lib that are really required. |
After some refactorings, I've managed to reduce the image size even further:
The auto-complete index and example files are removed, and also 'groff' is removed (I'm assuming people don't need help pages in their Docker images) |
This is very simple, https://github.com/flaccid/docker-awscli/blob/master/Dockerfile and does the job but let me know via my github issues if anything else is needed in the image (valid use case). |
The above APK is based on AWS-CLI 1.18, not on the v2 CLI. |
Any chance Amazon would consider creating an image with version 1 of the CLI? |
@keeganwitt You should open a new Issue for that request. 👍 |
I read Issue #3529 and #3291 and saw those were closed, with the only reaction hinting it was 'not that complicated'. However, the comment also acknowledged that doing this yourself would run the risk of being out of date. Apart from exactly that point, I would also like to point out that, for commercial users, having an official Amazon image is hugely preferential to "/aws-cli:latest".
In my case, I would be using this in a Google Cloud Build because it is far superior than AWS CodeBuild.
The text was updated successfully, but these errors were encountered: