-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
187 lines (164 loc) · 4.3 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
FROM debian:bullseye
LABEL maintainer "[email protected]"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
unzip \
unrar-free \
curl \
wget \
openssl \
ca-certificates \
python3 \
python3-pip \
python3-dev \
python3-yaml \
python3-virtualenv \
virtualenvwrapper \
libxml2-dev \
libxslt-dev \
libffi-dev \
libssl-dev \
jq \
ssh \
rsync \
git \
pass \
gpg \
qemu-utils \
sgabios \
seabios \
qemu-system\
qemu-efi\
qemu-kvm\
qemu \
python3-libvirt\
python3-libqcow\
libvirt0\
libncursesw5 \
gcc \
python3-setuptools \
apt-transport-https \
lsb-release \
openssh-client \
gnupg \
emacs \
netcat socat kafkacat\
tmux \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /tmp
###############
#### RClone
###############
RUN wget http://downloads.rclone.org/rclone-current-linux-amd64.zip && \
unzip rclone-current-linux-amd64.zip -d /usr/bin && \
rm *.zip
###############
#### Packer
###############
ARG PACKER_VERSION=1.5.4
RUN wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip && \
unzip packer_${PACKER_VERSION}_linux_amd64.zip && \
chmod +x packer && \
mv packer /usr/bin && \
rm *.zip
###############
#### Terraform
###############
ARG TERRAFORM_VERSION=1.1.9
RUN wget https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip && \
chmod +x terraform && \
mv terraform /usr/bin && \
rm *.zip
###############
#### AWS
###############
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm *.zip
###############
#### File Formats
###############
RUN wget https://github.com/mikefarah/yq/releases/download/v4.2.0/yq_linux_amd64 -O /usr/bin/yq &&\
chmod +x /usr/bin/yq
###############
#### Ansible
###############
RUN pip3 install --upgrade \
setuptools \
ansible \
paramiko \
PyYAML \
pycrypto \
pywinrm \
poetry \
ansible-lint \
urllib3 \
python-dateutil \
jmespath \
boto \
boto3 \
botocore \
diagrams
###############
#### Digital certificates
###############
RUN wget https://github.com/xenolf/lego/releases/download/v2.1.0/lego_v2.1.0_linux_amd64.tar.gz -O lego.tar.gz && \
tar -zxvf lego.tar.gz && \
chmod +x lego && \
mv lego /bin/lego && \
rm *.tar.gz
###############
#### VMWare
###############
COPY VMware-ovftool-4.3.0-13981069-lin.x86_64.bundle /tmp/ovftool
RUN sh /tmp/ovftool -p /usr/local --console --eulas-agreed --required && \
rm /tmp/ovftool
###############
#### Kubernetes
###############
RUN curl -Lo kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv ./kubectl /usr/local/bin/ && \
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \
chmod +x skaffold && \
mv ./skaffold /usr/local/bin/
###############
#### Finance & Machine learning
###############
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
gfortran \
libfreetype6-dev \
libhdf5-dev \
liblapack-dev \
libopenblas-dev \
libpng-dev && \
mkdir -p /tmp/talib && \
cd /tmp/talib && \
curl -fsSL http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz | tar xvz --strip-components 1 && \
./configure --prefix=/usr && \
make && \
make install && \
apt clean && \
rm -Rf /tmp/*
###############
#### Slack integration
###############
RUN curl https://raw.githubusercontent.com/rockymadden/slack-cli/46d22741e82d749180ae91512515132a9380ad57/src/slack > /usr/local/bin/slack && \
chmod +x /usr/local/bin/slack
###############
#### User setup
###############
RUN useradd --system --uid 1000 -m --shell /usr/bash devops && \
mkdir -p /home/devops && \
chown devops /home/devops
USER devops
ENV PATH="/home/devops/.local/bin/:${PATH}"
RUN git clone https://github.com/syl20bnr/spacemacs ~/.emacs.d
COPY main.sh /
ENTRYPOINT ["/main.sh"]
CMD ["default"]