-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (46 loc) · 1.6 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
FROM alpine:3.9
LABEL maintainer="William Chanrico <williamchanrico@gmail.com>"
RUN apk update && apk add --no-cache \
openssh \
bash \
ca-certificates \
sudo \
jq \
vim \
git \
wget \
curl \
bind-tools \
python \
py-pip \
tcpdump \
iputils \
unzip \
tmux \
iproute2 \
netcat-openbsd \
redis \
postgresql-client \
net-tools \
busybox-extras \
mysql-client \
# Configure ssh using 'root' user with password 'root'
&& sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config \
&& echo "root:root" | chpasswd \
&& rm -rf /var/cache/apk/* \
&& sed -ie 's/#Port 22/Port 22/g' /etc/ssh/sshd_config \
&& sed -ri 's/#HostKey \/etc\/ssh\/ssh_host_key/HostKey \/etc\/ssh\/ssh_host_key/g' /etc/ssh/sshd_config \
&& sed -ir 's/#HostKey \/etc\/ssh\/ssh_host_rsa_key/HostKey \/etc\/ssh\/ssh_host_rsa_key/g' /etc/ssh/sshd_config \
&& sed -ir 's/#HostKey \/etc\/ssh\/ssh_host_dsa_key/HostKey \/etc\/ssh\/ssh_host_dsa_key/g' /etc/ssh/sshd_config \
&& sed -ir 's/#HostKey \/etc\/ssh\/ssh_host_ecdsa_key/HostKey \/etc\/ssh\/ssh_host_ecdsa_key/g' /etc/ssh/sshd_config \
&& sed -ir 's/#HostKey \/etc\/ssh\/ssh_host_ed25519_key/HostKey \/etc\/ssh\/ssh_host_ed25519_key/g' /etc/ssh/sshd_config \
&& /usr/bin/ssh-keygen -A \
&& ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_key -N ""
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# Custom stand-alone binaries
COPY bin/httpstat-v1.0.0 /usr/local/bin/httpstat
COPY bin/grpcurl-v1.4.0 /usr/local/bin/grpcurl
COPY bin/debugapp /usr/local/bin/debugapp
WORKDIR /root
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["--http-port", "80", "--https-port", "443"]