aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2017-04-04 10:31:06 -0600
committerkballou <kballou@devnulllabs.io>2017-04-04 10:31:06 -0600
commitfec88379bfc3e6e3fce4d5a9c37839c7f9966117 (patch)
tree37e8fbe62eebc55b0bf70eed2185a87ff3741f29
parente7ef58541f66c191d9eb6acae13cd25af90fa3b8 (diff)
downloaddocker-awscli-fec88379bfc3e6e3fce4d5a9c37839c7f9966117.tar.gz
docker-awscli-fec88379bfc3e6e3fce4d5a9c37839c7f9966117.tar.xz
Fleshout dockerfile, makefile, and helper script
-rw-r--r--Dockerfile14
-rw-r--r--Makefile12
-rw-r--r--README.md12
-rwxr-xr-xbin/docker-awscli.sh7
4 files changed, 45 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f6ebba2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,14 @@
+FROM alpine:latest
+MAINTAINER kballou@devnulllabs.io
+
+RUN apk -Uuv add \
+ groff \
+ less \
+ python \
+ py-pip && \
+ pip install awscli && \
+ apk --purge -v del \
+ py-pip && \
+ rm /var/cache/apk/*
+
+ENTRYPOINT ["aws"]
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..90f543a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,12 @@
+TAG:=kennyballou/docker-awscli:latest
+
+.PHONY: all
+all: build
+
+.PHONY: build
+build: Dockerfile
+ docker build -t $(TAG) .
+
+.PHONY: clean
+clean:
+ -docker rmi $(TAG)
diff --git a/README.md b/README.md
index 2e3b292..85ae359 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,18 @@
Alpine Linux AWS CLI Container
+## Running ##
+
+Running the container should be as simple as passing in your AWS credentials,
+and providing a command:
+
+```
+docker run --rm -v ~/.aws:/root/.aws:ro kennyballou/docker-awscli {aws_command}
+```
+
+Such a invocation can be abstracted to a shell script, as found in the `bin`
+directory.
+
## LICENSE ##
This code is provided AS-IS, WITHOUT warranty under the terms of the GNU
diff --git a/bin/docker-awscli.sh b/bin/docker-awscli.sh
new file mode 100755
index 0000000..83cf073
--- /dev/null
+++ b/bin/docker-awscli.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+docker run \
+ --rm \
+ --volume ${HOME}/.aws:/root/.aws:ro \
+ kennyballou/docker-awscli:latest \
+ $@