File size: 746 Bytes
7815590
42dc4f4
 
6ba1188
42dc4f4
 
 
 
dce1443
7815590
b149a8a
6ba1188
b149a8a
 
6ba1188
8b800fe
5b6367a
316d4a9
 
 
 
8b800fe
7815590
bf39701
5b6367a
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
FROM debian:11

RUN apt update
RUN apt install -y cmake make gcc g++ git curl sudo openssh-server
RUN curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
RUN apt install -y nodejs
RUN npm i -g yarn
RUN yarn global add wetty

RUN echo 'root:root' | chpasswd
# Crear usuario con UID 1000
RUN useradd -u 1000 xd

# Establecer contraseña para el usuario
RUN echo 'xd:xd' | chpasswd

# Generar claves de host SSH
RUN sed -ri 's/^#?PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
RUN mkdir /root/.ssh
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

EXPOSE 7860

CMD /usr/sbin/sshd -D & wetty -p 7860 --allow-remote-hosts && tail -f /dev/null