This repository has been archived on 2021-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
Files
docker-debian-playground/Dockerfile
2021-12-26 14:29:12 +01:00

34 lines
1.0 KiB
Docker

FROM ich777/debian-baseimage
LABEL maintainer="admin@minenet.at"
ENV DATA_DIR="/debian"
ENV USER_PWD="password"
ENV ROOT_PWD="password"
ENV UMASK=0000
ENV UID=99
ENV GID=100
ENV USER="debian"
ENV DATA_PERM=770
RUN apt-get update && \
apt-get -y install openssh-server nano
RUN mkdir -p /run/sshd && \
rm -v /etc/ssh/ssh_host_* && \
sed -i "/#Port 22/c\Port 8022" /etc/ssh/sshd_config && \
sed -i "/#ListenAddress 0.0.0.0/c\ListenAddress 0.0.0.0" /etc/ssh/sshd_config && \
sed -i "/#HostKey \/etc\/ssh\/ssh_host_rsa_key/c\HostKey \/debian\/.ssh\/ssh_host_rsa_key" /etc/ssh/sshd_config && \
sed -i "/#HostKey \/etc\/ssh\/ssh_host_ecdsa_key/c\HostKey \/debian\/.ssh\/ssh_host_ecdsa_key" /etc/ssh/sshd_config && \
sed -i "/#HostKey \/etc\/ssh\/ssh_host_ed25519_key/c\HostKey \/debian\/.ssh\/ssh_host_ed25519_key" /etc/ssh/sshd_config
RUN mkdir $DATA_DIR && \
useradd -d $DATA_DIR -s /bin/bash $USER && \
chown -R $USER $DATA_DIR && \
ulimit -n 2048
ADD /scripts/ /opt/scripts/
RUN chmod -R 770 /opt/scripts/
#Server Start
ENTRYPOINT ["/opt/scripts/start.sh"]