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

Provide Official AWS CLI Docker Image #3291

Closed
Rabadash8820 opened this issue Apr 26, 2018 · 28 comments
Closed

Provide Official AWS CLI Docker Image #3291

Rabadash8820 opened this issue Apr 26, 2018 · 28 comments
Assignees
Labels
duplicate This issue is a duplicate. guidance Question that needs advice or information. service-api This issue is due to a problem in a service API, not the SDK implementation.

Comments

@Rabadash8820
Copy link

Rabadash8820 commented Apr 26, 2018

I was surprised to find that there is no official Docker image for development with the AWS CLI. The "amazon" user on Docker Hub contains only the these images for working specifically with ECS and Elastic Beanstalk, and there do not appear to be any official Amazon Docker images on the new Docker Store yet.

When I searched "aws cli" on Docker Hub, the most popular image (with 1M+ downloads) was this one, created by Mesosphere. It's good enough, with a very simple Dockerfile based on the super-tiny Alpine Linux image. Upon further investigation, I found the aws-codebuild-docker-images repo in this organization, with an ubuntu-base Dockerfile. This image looks great, so why hasn't it been pushed to Docker Hub/Store? For that matter, why haven't any of the images in that repo been pushed? The Mesosphere aws-cli image will work fine, but its simplicity compared to that ubuntu-base made me concerned that it hasn't been properly optimized; similarly, the ubuntu-base image is based off Ubuntu 14.04.5, which is both old and bulky compared to Alpine Linux.

TL; DR
I believe there should be an official aws-cli Docker image maintained by Amazon and pushed to Docker Hub/Store. Ideally, it should support all the major modern Linux distros, including Alpine Linux. One should be able to run the following command, and have everything just work:

docker run -it amazon/aws-cli

EDIT

This Issue is now being tracked at #3553. You should like that one to show your support and leave comments in that thread. This Issue is closed.

@JordonPhillips
Copy link
Member

Those images you link to are owned by the CodeBuild team for use in their service. If you want them to publish them to docker hub, I would recommend contacting them in their service forum / via support.

In general I'm not sure what value there is in having a docker image that is only the CLI. I can see the value for something that is difficult / complicated to install and get an mvp running, but the CLI is not that complicated: install python, install pip, install cli. Most distros even have a prebuilt package (though you run the risk of being out of date).

@JordonPhillips JordonPhillips added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Apr 26, 2018
@xplorld
Copy link

xplorld commented Aug 1, 2018

An AWS CLI Docker image is useful in Kubernetes deployment scenarios.

@alexandrusavin
Copy link

It is also valuable in CI/CD dockerised environments (like Jenkins pipeline). Instead of installing aws-cli on every build, it is easier to just use a Docker image that can be cached.

@Rabadash8820
Copy link
Author

Yeah wow I kinda totally forgot that I opened this issue...

I realize that it might seem trivial to create a Docker image for every little CLI program out there, as apt geting from a Dockerfile should be enough for any sensible user to get up and running. The point is to remove additional steps. Yes I could create a Dockerfile FROM the base debian image, apt get Python, and then get all the other tools I need that depend on Python...or I could just start FROM the Python image and have one less thing to download, one less barrier to using Python, especially for the scenarios mentioned by @xplorld and @alexandrusavin. I didn't raise this issue so much because this is a terrible roadblock that I could not overcome without Amazon's help, but because it seemed like a trivial "why not" for Amazon to implement and add some value for their AWS-and-Docker-using customers.

@evenvgw
Copy link

evenvgw commented Oct 10, 2018

This is also handy for those who just wants to validate cloudformation templates in a CI pipeline

@davidham
Copy link

It would also be useful for local development and keeping up with the latest versions of the CLI. We have had several devs get delayed for longer than necessary in getting the right version of python, the right version of pip, and then the right version of the CLI. Being able to run docker run --rm awscli:latest ... would be very handy.

@Rabadash8820
Copy link
Author

All, this Issue is now being tracked at #3553. You should like that one to show your support and leave comments in that thread. This Issue is closed.

@scchess
Copy link

scchess commented Oct 26, 2018

Docker will be useful.

@obonyojimmy
Copy link

Definately official Docker image will be usefull

@justnance justnance added guidance Question that needs advice or information. service-api This issue is due to a problem in a service API, not the SDK implementation. labels Dec 7, 2018
@kivagant-ba
Copy link

install python, install pip, install cli.

Then run aws and get command not found. Very simple.

@lucasbasquerotto
Copy link

For now I'm using a Dockerfile like in this repo:

FROM python:alpine

ARG CLI_VERSION=1.16.86

RUN apk -uv add --no-cache groff jq less && \
    pip install --no-cache-dir awscli==$CLI_VERSION

WORKDIR /aws

CMD sh

It's a trivial stuff to do, but it would be definitely better to have an official image of the aws-cli.

@jakubigla
Copy link

In general I'm not sure what value there is in having a docker image that is only the CLI. I can see the value for something that is difficult / complicated to install and get an mvp running, but the CLI is not that complicated: install python, install pip, install cli.

I can not believe, this is a comment from AWS employee. It's actually sad.

@asc-adean
Copy link

I'm in a similar scenario where I want to run a K8S Cronjob that performs backups to S3, having an official awscli image sure would be handy right about now

@justnance
Copy link

We are using issue #3553 to track the feature request for this request.

@justnance justnance added the duplicate This issue is a duplicate. label May 3, 2019
@k7faq
Copy link

k7faq commented May 5, 2019

Those images you link to are owned by the CodeBuild team for use in their service. If you want them to publish them to docker hub, I would recommend contacting them in their service forum / via support.

In general I'm not sure what value there is in having a docker image that is only the CLI. I can see the value for something that is difficult / complicated to install and get an mvp running, but the CLI is not that complicated: install python, install pip, install cli. Most distros even have a prebuilt package (though you run the risk of being out of date).

Personally I containerize as much as I can to help keep my workstation clean of multiple packages. Packages that some day may contradict others when updated.

@asiby
Copy link

asiby commented May 21, 2019

Hello People of Github

It is important to also note that when you are using any CI/CD system that is billing you deployment task duration (e.g. $xx.xx per hours per month etc.), then you can't afford to spend time installing over and over again the tools you need after pulling an image that doesn't have all you need.

In my case, I am seeing a python image being pulled, then the zip package being installed, and now I need the awscli installed and that one takes quite a while to install. It's simply a wasted time that we could do without.

Having a docker image with all pre-installed tools will be priceless.

@b4nst
Copy link

b4nst commented Jun 17, 2019

There is now a docker image builded automatically on each awscli release here

⚠️ Disclaimer : I'm the author

@asiby
Copy link

asiby commented Aug 10, 2019

Thanks b4nst. But I have picked one that is built and maintained by Atlassian for the Bitbucket Pipeline. It's on the DockerHub as atlassian/pipelines-awscli (https://hub.docker.com/r/atlassian/pipelines-awscli). And I am using this with their pipeline.

@abdennour
Copy link

@b4nst please link docker hub repo with your github so we can see the source code

@b4nst
Copy link

b4nst commented Sep 26, 2019

There was already a link to the docker hub page. The code is hosted here

@asiby
Copy link

asiby commented Sep 26, 2019

The elephant in the room here is that when people are using CI/CD, and handling sensitive codes that are part of a corporate software, they tend to want to know who and what is handling their code. So even with the good intentions, people tend to get wary when it comes to something not back by a big company unless they see the source code. I personally think that there is nothing wrong with @b4nst's docker image. I checked the code and it's fine. It just happened that the one from Atlassian has a few more things in it that are needed during our deployment processes. For instance, it have git, less among other things. That way, the same image is able to let us clone stuff from any git repository.

@b4nst
Copy link

b4nst commented Sep 26, 2019

Totally agree with that, the best solution is AWS shipping its own up to date docker image (if you trust them for the cli, you trust them for the image). But meanwhile, I think open source is the lesser evil. Even if it's backed by a big company, it could be corrupted (I would not trust Microsoft or Google for an awscli if I can't read the code...)

@abdennour
Copy link

abdennour commented Oct 6, 2019

I made a bakery of images with continuous Deployment to Dockerhub abdennour/aws.

One of images is AWS image.

If you want to upgrade to latest versions, you just need to update .env and open PR.

@thearthur
Copy link

Even the AWS images for amazonlinux which state in the documentation that amazonlinux has the cli installed by default... don't.

Amazon is a monopoly and they know it. They don't have to care?

@viktor-ku
Copy link

+1

@Xaeonn
Copy link

Xaeonn commented Apr 1, 2020

I ended up here while searching for one and found an official image afterwards, so I'll stick the it here for anyone who finds this thread in the future.

https://hub.docker.com/r/amazon/aws-cli

@Rabadash8820
Copy link
Author

@Xaeonn Correct, that is the new official AWS CLI Docker image. An Amazon dev just announced this last night in #3553, where this issue is now being tracked, as I commented above.

@obonyojimmy
Copy link

install python, install pip, install cli.

Then run aws and get command not found. Very simple.

😄 😆 😆 classic 💯 , always makes my day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue is a duplicate. guidance Question that needs advice or information. service-api This issue is due to a problem in a service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests