Provides ssh login for specified user. and installs basic packages like zip/gzip, git, curl, sshd
206
Dockerfile
FROM ubuntu:18.04 MAINTAINER Khelender Sasan [email protected]
RUN apt-get update &&
apt-get install -y gzip unzip git curl net-tools openssh-server supervisor
ENV containername sasan-sshd.v4
ADD Dockerfile /opt/sasan/Dockerfile.${containername}
ENV OWNER khelender
ENV USER root ENV KEYFILE ssh-keys-${OWNER}.pub RUN mkdir -p /${USER}/.ssh ADD ${KEYFILE} /${USER}/.ssh/authorized_keys
ENV USER ${OWNER} ENV KEYFILE ssh-keys-${USER}.pub RUN adduser --gecos ${USER} --disabled-password ${USER} RUN mkdir -p /home/${USER}/.ssh ADD ${KEYFILE} /home/${USER}/.ssh/authorized_keys RUN chmod 400 /home/${USER}/.ssh/authorized_keys #ADD ${USER}.pwd /tmp/${USER}.pwd #RUN passwd ${USER} < /tmp/${USER}.pwd ADD ${USER}_sudo /etc/sudoers.d/${USER}_sudo RUN usermod -G sudo ${USER} RUN chown -R ${USER}:${USER} /home/${USER}/.ssh
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf RUN mkdir -p /var/run/sshd EXPOSE 22 CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
Content type
Image
Digest
Size
130.1 MB
Last updated
over 8 years ago
docker pull sasan/sshd:v4