-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathDockerfile
49 lines (43 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Docker file to run AWS CLI, S3CMD and RDS tools.
FROM cgswong/java:openjdk8
MAINTAINER Stuart Wong <[email protected]>
ENV S3_TMP /tmp/s3cmd.zip
ENV S3_ZIP /tmp/s3cmd-master
ENV RDS_TMP /tmp/RDSCLi.zip
ENV RDS_VERSION 1.19.004
ENV JAVA_HOME /usr/lib/jvm/default-jvm
ENV AWS_RDS_HOME /usr/local/RDSCli-${RDS_VERSION}
ENV PATH ${PATH}:${AWS_RDS_HOME}/bin:${JAVA_HOME}/bin:${AWS_RDS_HOME}/bin
ENV PAGER more
WORKDIR /tmp
ADD requirements.txt .
RUN apk --no-cache add \
bash \
bash-completion \
groff \
less \
curl \
jq \
py-pip \
python \
unzip \
openssh &&\
pip install --upgrade --no-cache-dir \
pip \
setuptools &&\
pip install --no-cache-dir \
python-dateutil &&\
pip install -r requirements.txt --no-cache-dir &&\
ln -s /usr/bin/aws_bash_completer /etc/profile.d/aws_bash_completer.sh &&\
curl -sSL --output ${S3_TMP} https://github.com/s3tools/s3cmd/archive/master.zip &&\
curl -sSL --output ${RDS_TMP} https://s3.amazonaws.com/rds-downloads/RDSCli-${RDS_VERSION}.zip &&\
unzip -q ${S3_TMP} -d /tmp &&\
unzip -q ${RDS_TMP} -d /tmp &&\
mv ${S3_ZIP}/S3 ${S3_ZIP}/s3cmd /usr/bin/ &&\
mv /tmp/RDSCli-${RDS_VERSION} /usr/local/ &&\
rm -rf /tmp/* &&\
mkdir ~/.aws &&\
chmod 700 ~/.aws
# Expose volume for adding credentials
VOLUME ["~/.aws"]
CMD ["/bin/bash", "--login"]