-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
39 lines (32 loc) · 998 Bytes
/
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
FROM debian:stable
LABEL mantainer "hacklab/ <[email protected]>"
ENV USER_NAME=''
ENV USER_PASSWORD=''
ENV USER_FOLDER=''
RUN apt update && apt install -y \
openssh-server \
nmap \
curl \
tcpdump \
jq \
wget \
rsync \
tmux \
locales-all \
vim nano \
git \
mariadb-client \
postgresql-client \
&& apt-get clean -y
RUN curl https://getmic.ro | bash
RUN mv micro /usr/local/bin
RUN mkdir /var/run/sshd && \
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \
echo "export VISIBLE=now" >> /etc/profile
COPY entrypoint.sh /
COPY authorized_keys /root/.ssh/authorized_keys
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 22
CMD /usr/sbin/sshd -D