testx / Dockerfile
accplan
test
0f6613b
raw
history blame
487 Bytes
FROM alpine:latest
LABEL maintainer="victorych"
RUN apk add --update --no-cache openssh
RUN echo 'PasswordAuthentication yes' >> /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 2222
USER root
CMD ssh-keygen -t ed25519 -f $HOME/.ssh/id_ed25519 && \
/usr/sbin/sshd -h $HOME/.ssh/id_ed25519 -p 2222 -D -e "$@"
# -D