-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile.tools
178 lines (164 loc) · 7.71 KB
/
Dockerfile.tools
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
FROM ubuntu:focal-20240530
ENV DEBIAN_FRONTEND=noninteractive
ENV ACCEPT_EULA=y
ARG CLOJURE_VERSION=1.10.3.1040
ARG AWS_CLI_VERSION=2.9.6
ARG AWS_SM_VERSION=1.2.398.0
ARG GCLOUD_VERSION=488.0.0-0
ARG GCLOUD_GKE_AUTH_PLUGIN=467.0.0-0
ARG NODE_VERSION=20.17.0
# Common
RUN mkdir -p /app && \
apt-get update -y && \
apt-get install -y \
python3-dev \
python3-pip \
locales \
tini \
apt-utils \
curl \
gnupg \
gnupg2 \
net-tools \
netcat \
groff \
jq \
openssh-client \
unzip \
expect \
less \
gettext-base \
lsb-release \
alien \
libaio1 \
elfutils \
libelf-dev \
bc \
wget \
&& \
ln -s /usr/bin/python3 /usr/bin/python
RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
armhf) ARCH='armv7l';; \
i386) ARCH='x86';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& export GNUPGHOME="$(mktemp -d)" \
&& set -ex \
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 \
61FC681DFB92A079F1685E77973F295594EC4689 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
A363A499291CBBC940DD62E41F10027AF002F8B0 \
CC68F5A3106FF448322E48ED27F5E38D5B0A215F \
; do \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& gpgconf --kill all \
&& rm -rf "$GNUPGHOME" \
&& grep " node-v$NODE_VERSION-linux-$ARCH.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& node --version \
&& npm --version
# kubectl / aws-cli / aws-session-manager
RUN curl -sL "https://dl.k8s.io/release/v1.22.1/bin/linux/amd64/kubectl" -o kubectl && \
echo '78178a8337fc6c76780f60541fca7199f0f1a2e9c41806bded280a4a5ef665c9 kubectl' | sha256sum -c --ignore-missing --strict - && \
chmod 755 kubectl && \
mv kubectl /usr/local/bin/kubectl && \
curl -sL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-$AWS_CLI_VERSION.zip" -o awscli-exe-linux-x86_64-$AWS_CLI_VERSION.zip && \
echo '8f1de286d2c66cc0d0d26f205fdb17d5ed073f1e97f305c522e2d1fd89d5c854 awscli-exe-linux-x86_64-2.9.6.zip' | sha256sum \
-c --ignore-missing --strict - && \
unzip -q awscli-exe-linux-x86_64-$AWS_CLI_VERSION.zip && \
aws/install && \
aws --version && \
rm -rf aws && \
curl -sL "https://s3.amazonaws.com/session-manager-downloads/plugin/$AWS_SM_VERSION/ubuntu_64bit/session-manager-plugin.deb" -o session-manager-plugin.deb && \
echo 'aae58e58fcfbba465231086766d236ce8d032ae73b9335690e1faba704af2f9a session-manager-plugin.deb' | sha256sum \
-c --ignore-missing --strict - && \
dpkg -i session-manager-plugin.deb && \
rm -rf /tmp/* session-manager-plugin.deb
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list && \
echo "deb [arch=amd64,arm64] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list && \
echo "deb https://cli-assets.heroku.com/apt ./" > /etc/apt/sources.list.d/heroku.list && \
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl -sL https://cli-assets.heroku.com/apt/release.key | apt-key add - && \
curl -sL https://packages.microsoft.com/config/ubuntu/20.04/prod.list | tee /etc/apt/sources.list.d/msprod.list && \
curl -sL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
curl -sL https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add - && \
curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl -sL https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
RUN apt-get update -y && \
apt-get install -y \
mongodb-mongosh mongodb-org-tools mongodb-org-shell \
openjdk-11-jre \
heroku \
default-mysql-client \
postgresql-client-15 \
sqlcmd \
unixodbc-dev \
google-cloud-cli=$GCLOUD_VERSION \
google-cloud-sdk-gke-gcloud-auth-plugin=$GCLOUD_GKE_AUTH_PLUGIN && \
rm -rf /var/lib/apt/lists/*
# Download and install Oracle Instant Client and SQL*Plus
RUN URL_ORACLE_BASIC= && URL_ORACLE_SQLPLUS= && dpkgArch="$(dpkg --print-architecture)" \
&& case "${dpkgArch##*-}" in \
amd64) URL_ORACLE_BASIC='https://download.oracle.com/otn_software/linux/instantclient/1924000/instantclient-basic-linux.x64-19.24.0.0.0dbru.zip';; \
arm64) URL_ORACLE_BASIC='https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linux-arm64.zip';; \
i386) URL_ORACLE_BASIC='https://download.oracle.com/otn_software/linux/instantclient/1924000/instantclient-basic-linux-19.24.0.0.0dbru.zip';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& case "${dpkgArch##*-}" in \
amd64) URL_ORACLE_SQLPLUS='https://download.oracle.com/otn_software/linux/instantclient/1924000/instantclient-sqlplus-linux.x64-19.24.0.0.0dbru.zip';; \
arm64) URL_ORACLE_SQLPLUS='https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linux-arm64.zip';; \
i386) URL_ORACLE_SQLPLUS='https://download.oracle.com/otn_software/linux/instantclient/1924000/instantclient-sqlplus-linux-19.24.0.0.0dbru.zip';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& mkdir -p /opt/oracle && \
cd /opt/oracle && \
wget -O instantclient-basic-linux.zip $URL_ORACLE_BASIC && \
wget -O instantclient-sqlplus-linux.zip $URL_ORACLE_SQLPLUS && \
unzip instantclient-basic-linux.zip && \
rm -rf META-INF && \
unzip instantclient-sqlplus-linux.zip && \
rm instantclient-basic-linux.zip && \
rm instantclient-sqlplus-linux.zip && \
echo 'set markup csv on delimiter "\t" quote off\nset heading on echo off termout off\nset feedback off trimspool on' >> instantclient_19_24/glogin.sql && \
cd /
# Configure environment variables
ENV PATH="/opt/oracle/instantclient_19_24:$PATH"
ENV LD_LIBRARY_PATH="/opt/oracle/instantclient_19_24:$LD_LIBRARY_PATH"
# clojure
RUN curl -sL https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh -o clojure-install.sh && \
sha256sum clojure-install.sh && \
echo "665e35e8d7dd0996edaba36220fd5048fee95f5155ec0426f628f18770239821 clojure-install.sh" | sha256sum -c - && \
bash clojure-install.sh && \
rm clojure-install.sh && \
clojure -e "(clojure-version)"
RUN pip3 install -U \
boto3==1.20.39 \
requests==2.27.1
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV NODE_PATH=/usr/local/lib/node_modules/
ENV PATH="/app:${PATH}"
ENTRYPOINT ["tini", "--"]