-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
64 lines (58 loc) · 1.64 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
# based-off alpine-3.10: https://github.com/docker-library/docker/blob/master/19.03/Dockerfile#L1
FROM docker:19-dind
ARG tfenv_version="2.0.0"
VOLUME /var/lib/docker
# Install git, SSH, and other utilities
RUN set -ex && \
apk add --no-progress --no-cache \
bash \
ca-certificates \
curl \
curl-dev \
diffutils \
g++ \
gcc \
git \
jq \
libc-dev \
libffi-dev \
make \
ncurses \
netcat-openbsd \
openssh \
openssl-dev \
pkgconf \
python3-dev \
py3-pip \
ruby-bundler \
ruby-dev \
ruby-json \
sed \
tree \
wget \
zip && \
mkdir -p ~/.ssh ~/.aws/cli/cache && \
ssh-keyscan -H github.com >> ~/.ssh/known_hosts && \
ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts
# pip
RUN pip3 install -U pip
RUN set -ex && \
pip3 install -U \
docker-compose \
awscli \
boto3 \
ansible \
requests \
cffi
# terraform via tfenv
RUN set -ex && \
cd /opt && \
wget "https://github.com/tfutils/tfenv/archive/v${tfenv_version}.tar.gz" && \
tar xf "v${tfenv_version}.tar.gz" && \
ln -sf "/opt/tfenv-${tfenv_version}/bin/"* /usr/local/bin && \
tfenv list-remote | grep 0\.11\. | grep -v '\(alpha\|beta\|rc\|0\.11\.15\)' | head -n5 | xargs -n1 tfenv install && \
tfenv list-remote | grep 0\.12\. | grep -v '\(alpha\|beta\|rc\)' | head -n5 | xargs -n1 tfenv install && \
tfenv list-remote | grep 0\.13\. | grep -v '\(alpha\|beta\|rc\)' | head -n10 | xargs -n1 tfenv install
# Configure SSH
COPY ssh_config ~/.ssh/config
COPY dockerd-entrypoint.sh /usr/local/bin/