forked from nicolaka/netshoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·98 lines (86 loc) · 2.16 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
FROM debian:stable-slim as fetcher
COPY build/fetch_binaries.sh /tmp/fetch_binaries.sh
RUN apt-get update && apt-get install -y \
curl \
wget
RUN /tmp/fetch_binaries.sh
FROM alpine:3.15.4
RUN set -ex \
&& echo "http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
&& echo "http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& apk update \
&& apk upgrade \
&& apk add --no-cache \
apache2-utils \
bash \
bind-tools \
bird \
bridge-utils \
busybox-extras \
conntrack-tools \
curl \
dhcping \
drill \
ethtool \
file\
fping \
iftop \
iperf \
iperf3 \
iproute2 \
ipset \
iptables \
iptraf-ng \
iputils \
ipvsadm \
jq \
libc6-compat \
liboping \
mtr \
net-snmp-tools \
netcat-openbsd \
nftables \
ngrep \
nmap \
nmap-nping \
nmap-scripts \
openssl \
py3-pip \
py3-setuptools \
scapy \
socat \
speedtest-cli \
strace \
tcpdump \
tcptraceroute \
tshark \
util-linux \
vim \
git \
zsh \
websocat \
swaks
# Installing httpie ( https://httpie.io/docs#installation)
RUN pip3 install --upgrade httpie
# Installing ctop - top-like container monitor
COPY --from=fetcher /tmp/ctop /usr/local/bin/ctop
# Installing calicoctl
COPY --from=fetcher /tmp/calicoctl /usr/local/bin/calicoctl
# Installing termshark
COPY --from=fetcher /tmp/termshark /usr/local/bin/termshark
# Setting User and Home
USER root
WORKDIR /root
ENV HOSTNAME netshoot
# ZSH Themes
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
RUN git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
COPY zshrc .zshrc
COPY motd motd
# Fix permissions for OpenShift and tshark
RUN chmod -R g=u /root
RUN chown root:root /usr/bin/dumpcap
# Running ZSH
CMD ["zsh"]