-
Notifications
You must be signed in to change notification settings - Fork 39
/
Dockerfile
69 lines (55 loc) · 1.91 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM ubuntu:16.04
MAINTAINER Fabian Stäber, fabian@fstab.de
ENV LAST_UPDATE=2016-08-21
#####################################################################################
# Current version is aws-cli/1.10.53 Python/2.7.12
#####################################################################################
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y tzdata locales
# Set the timezone
RUN echo "Europe/Berlin" | tee /etc/timezone && \
ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata
# Set the locale for UTF-8 support
RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && \
locale-gen && \
update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# AWS CLI needs the PYTHONIOENCODING environment varialbe to handle UTF-8 correctly:
ENV PYTHONIOENCODING=UTF-8
# man and less are needed to view 'aws <command> help'
# ssh allows us to log in to new instances
# vim is useful to write shell scripts
# python* is needed to install aws cli using pip install
RUN apt-get install -y \
less \
man \
ssh \
python \
python-pip \
python-virtualenv \
vim \
vim-nox \
zip
RUN adduser --disabled-login --gecos '' aws
WORKDIR /home/aws
USER aws
RUN \
mkdir aws && \
virtualenv aws/env && \
./aws/env/bin/pip install awscli && \
echo 'source $HOME/aws/env/bin/activate' >> .bashrc && \
echo 'complete -C aws_completer aws' >> .bashrc
USER root
RUN mkdir examples
ADD examples/etag.sh /home/aws/examples/etag.sh
ADD examples/s3diff.sh /home/aws/examples/s3diff.sh
ADD examples/start.sh /home/aws/examples/start.sh
ADD examples/terminate.sh /home/aws/examples/terminate.sh
ADD examples/init-instance.script /home/aws/examples/init-instance.script
ADD examples/README.md /home/aws/examples/README.md
RUN chown -R aws:aws /home/aws/examples
USER aws