testx / Dockerfile_old
accplan
test
82f96f7
raw
history blame
962 Bytes
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