-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
62 lines (49 loc) · 1.48 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
### base container image
FROM ubuntu:24.04 AS base
MAINTAINER dergeberl
LABEL org.opencontainers.image.source https://github.com/dergeberl/multitool-container
COPY bash_aliases /root/.bash_aliases
COPY bash_banner /root/.bash_banner
RUN apt update && \
apt upgrade -y && \
apt install -y --no-install-recommends \
ca-certificates \
bash \
curl \
wget \
vim \
nano \
htop \
iputils-ping && \
echo "cat ~/.bash_banner" >> /root/.bashrc && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
CMD ["sleep", "infinity"]
### nettools container image
FROM base AS net
RUN apt update && \
apt install -y --no-install-recommends \
socat \
tcpdump \
dnsutils \
nmap \
net-tools \
ethtool \
netcat-openbsd \
sysstat \
iftop \
iotop \
lsof \
mtr && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
CMD ["sleep", "infinity"]
### kubectl container image
FROM base AS kubectl
RUN apt update && apt install -y gnupg2 && \
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' > /etc/apt/sources.list.d/kubernetes.list && \
apt update && apt install -y kubectl && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
CMD ["sleep", "infinity"]