donnemartin / saws

A supercharged AWS command line interface (CLI).
Other
5.24k stars 281 forks source link

Add Dockerfile for running SAWS in container #38

Closed frosforever closed 8 years ago

frosforever commented 8 years ago

Assuming Docker is installed, the container can be built by running docker build -t saws . and run via

docker run -it -e AWS_ACCESS_KEY_ID=<key> -e AWS_SECRET_ACCESS_KEY=<secret> -e AWS_DEFAULT_REGION=<region> saws

The container is currently pretty large as it's based on ubuntu:latest. Ultimately, it would be nice if this can be based on alpine:latest similar to https://github.com/anigeo/docker-awscli but I'm not yet sure how to get tty to work.

Similar to docker-awscli, keys can be passed in via env vars as shown above or by attaching the host's .aws to the container docker run -it -v ~/.aws/:/root/.aws:ro saws

If there's interest I can attempt to shrink the image, add to the README and publish to Dockerhub.

codecov-io commented 8 years ago

Current coverage is 96.05%

Merging #38 into master will not affect coverage as of b935797

@@            master     #38   diff @@
======================================
  Files           19      19       
  Stmts         1065    1065       
  Branches         0       0       
  Methods          0       0       
======================================
  Hit           1023    1023       
  Partial          0       0       
  Missed          42      42       

Review entire Coverage Diff as of b935797

Powered by Codecov. Updated on successful CI builds.

donnemartin commented 8 years ago

@frosforever thanks for the pull request, I'll try to look at this in more detail in a day or so.

donnemartin commented 8 years ago

@frosforever I think this could be helpful. We've had a few issues logged about users having difficulty installing with pip in their global environment due to potential issues with dependencies or permissions. I've been suggesting to use a virtualenv instead.

A container approach to running SAWS could be a nice addition.

frosforever commented 8 years ago

@donnemartin Brilliant. I'll try and make time this week to slim down the image but at least there's something here that works. I'm also not familiar how one submits official docker repos to docker hub. I'll try and look at that as well unless someone chimes in here.

Great tool by the way!

donnemartin commented 8 years ago

@frosforever great, I'll merge this. Feel free to open up another PR for the additional changes you suggested too. Thanks!

donnemartin commented 8 years ago

@frosforever also, an addition to the README would be nice :)