Skip to content

Commit 6c827b2

Browse files
committed
update Dockerfile and README
1 parent bd5fd1c commit 6c827b2

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ FROM alpine:3.7
22

33
LABEL maintainer Robert Peteuil <https://github.com/robertpeteuil>
44

5-
RUN apk --update add py-pip curl zip groff less bash && \
5+
RUN apk --update add python py-pip groff less bash curl && \
66
pip install -U awscli && \
7+
apk --purge -v del py-pip && \
78
rm -rf `find / -regex '.*\.py[co]' -or -name apk`
89

910
WORKDIR /aws

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# AWSCLI
22

3-
## Minimal AWS CLI Image for CI Runners and Local Aliases
3+
## Minimal AWS CLI Image for CI Runners and Local Alias Use
44

5-
Ideal image for executing AWS CLI commands from docker-based CI runners
6-
7-
## Supported tags and `Dockerfile` links
5+
### Supported tags and `Dockerfile` links
86

97
- [`latest` _(Dockerfile)_](https://github.com/robpco/docker-awscli/blob/master/Dockerfile)
108

@@ -14,14 +12,17 @@ Docker Hub Image: [https://hub.docker.com/r/robpco/awscli/](https://hub.docker.c
1412

1513
## CI SERVER USAGE
1614

17-
- Dramatically faster than base image with AWSCLI installed during each pipeline run
18-
- Small size enables downloading in a fraction of the time of base images
19-
- Doesn't require pip installation of the CLI and dependancies on each run
20-
- Includes `bash` support for bash-specific CI scripts or commands
15+
Image created to enable CI runners to execute AWS CLI commands
16+
17+
- Dramatically faster than downloading base image and installing AWS CLI for each execution
18+
- Downloads fast due to its Small size (~80 MB)
19+
- Executes fast as AWS CLI and dependancies are preinstalled
20+
- Includes `bash` and `curl` commands for use in CI scripts
2121

22-
When using with CI runners, set Image Entrypoint as shown below as default Entrypoint is `aws`.
22+
**Example `.gitlab-ci.yml` (GitLab CI)** using image to copy directory to S3
2323

24-
Example `.gitlab-ci.yml` (GitLab CI) that uses AWS CLI to copy `settings` folder to S3. (In this example, AWS Credentials are passed via environment variables set as Gitlab Secrets.)
24+
- Set Entrypoint to override default of `aws`
25+
- Pass AWS Credentials via environment variables set as CI Secrets
2526

2627
``` yaml
2728
image:
@@ -37,10 +38,10 @@ deploy:
3738
3839
## ALIAS USAGE
3940
40-
For local use create alias .bashrc that passes credentials:
41+
For CLI use create an alias .bashrc that passes credentials using one of the methods below
4142
4243
``` bash
43-
# Share "~/.aws" credential and configuration directory
44+
# Example alias that shares local host "~/.aws" directory
4445
alias aws='docker run --rm -t -v ~/.aws:/root/.aws:ro $(tty &>/dev/null && echo "-i") robpco/awscli'
4546
```
4647

0 commit comments

Comments
 (0)