-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ubuntu-1804
72 lines (64 loc) · 2.17 KB
/
Dockerfile.ubuntu-1804
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
FROM ubuntu:18.04
LABEL maintainer="William Chanrico <[email protected]>"
ADD sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get install -yq \
ca-certificates \
software-properties-common \
bind9utils \
cpustat \
curl \
redis-server \
postgresql-client \
dnsutils \
ethtool \
htop \
iperf \
iproute2 \
iptables \
jq \
lsb-release \
lsof \
make \
net-tools \
netcat-openbsd \
openssl \
tcpdump \
tree \
unzip \
vim \
wget \
gcc \
bash \
sudo \
inetutils-ping \
openssh-client \
openssh-server \
# Clean
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Configure ssh
RUN mkdir /var/run/sshd \
&& sed -i s/PermitRootLogin.*/PermitRootLogin\ no/ /etc/ssh/sshd_config \
&& sed -i s/PermitEmptyPasswords.*/PermitEmptyPasswords\ yes/ /etc/ssh/sshd_config \
&& 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 ""
RUN useradd -m -s /bin/bash developer \
&& echo 'developer:' >>/root/passwdfile \
&& echo "root:123root789" >>/root/passwdfile \
&& chpasswd -c SHA512 </root/passwdfile \
&& rm /root/passwdfile
# 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
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
WORKDIR /root
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["--http-port", "80", "--https-port", "443"]