Spaces:
Build error
Build error
File size: 962 Bytes
9916dc7 3d34266 9916dc7 ea2e3f6 c6ceb48 3d34266 ea2e3f6 3d34266 ea2e3f6 37e85c2 3d34266 37e85c2 3d34266 6bf438b 3d34266 228c247 3d34266 37e85c2 ac7c52a 3d34266 |
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 |
FROM alpine:latest
LABEL maintainer="victorych"
RUN apk add --update --no-cache openssh
RUN echo 'ListenAddress 0.0.0.0' >> /etc/ssh/sshd_config
RUN echo 'Port 7860' >> /etc/ssh/sshd_config
RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
RUN echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config
RUN echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config
RUN echo 'PermitTunnel yes' >> /etc/ssh/sshd_config
RUN echo 'GatewayPorts yes' >> /etc/ssh/sshd_config
RUN echo 'PidFile /home/user/ssh.pid' >> /etc/ssh/sshd_config
RUN cat /etc/ssh/sshd_config
RUN adduser -h /home/user -s /bin/sh -D user
RUN echo -n 'user:test' | chpasswd
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
RUN mkdir $HOME/app
WORKDIR $HOME/app
EXPOSE 7860
USER root
RUN exit 1
CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
/usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -D -e "$@"
# -D
|