-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
98 lines (93 loc) · 2.23 KB
/
Dockerfile
File metadata and controls
98 lines (93 loc) · 2.23 KB
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 alpine:3.21
COPY echo-server /echo-server
COPY httpstat-bin /bin/httpstat
COPY ssh_banner /etc/issue.net
COPY motd /etc/motd
COPY run /run.sh
RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk --update --no-cache add bash \
busybox-extras \
coreutils \
mandoc \
man-pages \
less \
less-doc \
tzdata \
rhash \
zsh \
sudo \
shadow \
curl \
wget \
wget2 \
bind-tools \
drill \
mtr \
git \
vim \
nano \
ack \
bat \
file \
inotify-tools \
fd \
fdupes \
at \
iproute2 \
iputils \
htop \
openssh \
nmap \
tmux \
screen \
tar \
xz \
zstd \
lrzip \
par2cmdline \
tree \
zip \
7zip \
unzip \
rsync \
rclone \
aria2 \
mediainfo \
dust \
ncdu \
tcpdump \
redis \
postgresql-client \
mysql-client \
openssh \
openssl \
sshfs \
jq \
yq \
lftp \
ncftp \
yt-dlp \
fio \
pv \
httrack \
&& rm -rf /var/cache/apk/* \
## Use q instead of dig - https://github.com/natesales/q \
&& curl -sSL https://github.com/natesales/q/releases/download/v0.19.2/q_0.19.2_linux_amd64.tar.gz | tar -xz -C /usr/local/bin q \
&& chmod +x /usr/local/bin/q \
&& chsh -s /bin/zsh root \
# && echo 'alias dig="q"' >> /root/.zshrc \
## SSH Setup \
&& ssh-keygen -A \
&& echo -e "engage\nengage" | passwd root \
## Chmod the rest of our utils we copied in earlier \
&& chmod +x /run /bin/httpstat /echo-server/echo-server
# When I fix echo-server to either have certs build in or not require them to start, this will go away.
WORKDIR /echo-server
ENV TZ UTC
ENV PORT 80
ENV SSLPORT 443
ENV SSHPORT 22
ENTRYPOINT ["/run.sh"]
CMD ["/echo-server/echo-server & /usr/sbin/sshd -D -e -o Port=${SSHPORT} -o PermitRootLogin=yes -o Banner=/etc/issue.net & wait"]