-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
140 lines (126 loc) · 4.23 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
FROM ubuntu:24.04
ENV TERM=xterm-256color
ENV EDITOR=nano
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y \
# Web
curl \
wget \
httping \
# Networking
iputils-ping \
dnsutils \
telnet \
tcpdump \
traceroute \
nmap \
net-tools \
iproute2 \
netcat-traditional \
# Security
ca-certificates \
openssl \
openssh-client \
# Editors
nano \
less \
vim \
# Development
git \
# Database
mysql-client \
postgresql-client \
influxdb-client \
# System
man \
man-db \
tmux \
bash \
bash-completion \
zsh \
locales \
# Utils
jq \
p7zip-full \
xz-utils \
rsync \
gnupg2 \
unzip \
tree \
# Other
redis-tools \
ldap-utils && \
rm -rf /var/lib/apt/lists/*
# Locale setup
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Architecture info
RUN echo "Architecture is $(dpkg --print-architecture)/$(uname -m)"
# yq
RUN ARCH=$(dpkg --print-architecture | sed s/armhf/arm/) && \
wget -qnv https://github.com/mikefarah/yq/releases/latest/download/yq_linux_${ARCH} -O /usr/bin/yq && \
chmod +x /usr/bin/yq && \
yq --version
# grpcurl
ENV GRPCURL_VERSION=1.9.1
RUN ARCH=$(dpkg --print-architecture | sed -e 's/amd64/x86_64/' -e 's/armhf/arm/') && \
if [ "$ARCH" = "arm" ] ; then exit 0 ; fi && \
wget -qnv -c https://github.com/fullstorydev/grpcurl/releases/download/v${GRPCURL_VERSION}/grpcurl_${GRPCURL_VERSION}_linux_${ARCH}.tar.gz -O - | tar -xz -C /usr/local/bin/ && \
chmod +x /usr/local/bin/grpcurl && \
grpcurl --version
# kubectl
RUN ARCH=$(dpkg --print-architecture | sed -e 's/armhf/arm/') && \
wget -qnv "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${ARCH}/kubectl" -O /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl && \
kubectl version --client=true
# helm
RUN ARCH=$(dpkg --print-architecture | sed -e 's/amd64/x86_64/' -e 's/armhf/arm/') && \
if [ "$ARCH" = "arm64" ] ; then exit 0 ; fi && \
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash && \
helm version
# minio client
RUN ARCH=$(dpkg --print-architecture | sed -e 's/armhf/arm/') && \
wget -qnv https://dl.min.io/client/mc/release/linux-${ARCH}/mc -O /usr/local/bin/mc && \
chmod +x /usr/local/bin/mc && \
mc --version
# xh
ENV XH_BINDIR="/usr/local/bin"
RUN ARCH=$(dpkg --print-architecture | sed -e 's/armhf/arm/') && \
if [ "$ARCH" = "arm" ] ; then exit 0 ; fi && \
curl -sfL https://raw.githubusercontent.com/ducaale/xh/master/install.sh | sh && \
xh --version
# oh-my-zsh
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN echo 'PS1="${fg[red]}[DEBUG-CONTAINER] %(!.%{%F{yellow}%}.)%n@%M ${PS1}"' >> /root/.zshrc
ENV SHELL="/bin/zsh"
ENV HOME="/root"
WORKDIR /root
# etcd
ENV ETCD_VER=v3.5.14
RUN ARCH=$(dpkg --print-architecture | sed -e 's/armhf/arm/') && \
if [ "$ARCH" = "arm" ] ; then exit 0 ; fi && \
mkdir -p /tmp/etcd-download && \
curl -L https://github.com/etcd-io/etcd/releases/download/${ETCD_VER}/etcd-${ETCD_VER}-linux-$(dpkg --print-architecture).tar.gz -o /tmp/etcd.tar.gz && \
tar xzvf /tmp/etcd.tar.gz -C /tmp/etcd-download --strip-components=1 && \
rm -f /tmp/etcd.tar.gz && \
mv /tmp/etcd-download/etcdctl /usr/local/bin/etcdctl && \
chmod +x /usr/local/bin/etcdctl && \
mv /tmp/etcd-download/etcdutl /usr/local/bin/etcdutl && \
chmod +x /usr/local/bin/etcdutl && \
rm -rf /tmp/etcd-download && \
etcdctl version && \
etcdutl version
# aws-cli
RUN ARCH=$(dpkg --print-architecture | sed -e 's/arm64/aarch64/' -e 's/amd64/x86_64/' -e 's/armhf/arm/') && \
if [ "$ARCH" = "arm" ] ; then exit 0 ; fi && \
mkdir -p /tmp/aws-cli-download && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" -o "/tmp/aws-cli-download/awscliv2.zip" && \
unzip -q /tmp/aws-cli-download/awscliv2.zip -d /tmp/aws-cli-download && \
/tmp/aws-cli-download/aws/install && \
rm -rf /tmp/aws-cli-download && \
aws --version
CMD ["/bin/zsh"]