Newer
Older
dockersand / dockerfiles / ds-debian / ds-debian.dockerfile
  1. # Dockerfile For Standard TundraWare Inc. Debian Image
  2.  
  3. FROM debian
  4. MAINTAINER tundra@tundraware.com
  5.  
  6. # Update OS and install software
  7.  
  8. RUN apt-get -y update
  9. RUN apt-get -y dist-upgrade
  10. RUN apt-get -y upgrade
  11. RUN apt-get -y install apt-utils
  12. RUN apt-get -y install bzip2 curl dnsutils dos2unix emacs-nox ethtool git \
  13. htop joe less lsof netcat net-tools nfs-common \
  14. nload openssh-server psmisc python-pip rsync screen \
  15. socat sudo silversearcher-ag tree unzip vim whois \
  16. wget zip
  17.  
  18. # Enable sshd with same keys each time
  19. ADD common/keys/ /etc/ssh/
  20. RUN mkdir /var/run/sshd
  21.  
  22. # Setup and configure user: root
  23.  
  24. ADD common/.ssh/ /root/.ssh/
  25. RUN chmod 700 /root
  26. RUN mkdir /root/tmp
  27. RUN chown -R root:root /root
  28. RUN chmod 700 /root/.ssh
  29. RUN chmod 600 /root/.ssh/authorized_keys
  30. RUN chmod 600 /root/.ssh/*rsa
  31.  
  32. # Setup and configure user: test
  33.  
  34. RUN useradd -m -p snLOSb4wiVD0k -u 1000 -s /bin/bash test
  35. ADD common/.ssh/ /home/test/.ssh/
  36. RUN chmod 700 /home/test
  37. RUN mkdir /home/test/tmp
  38. RUN chown -R test:test /home/test
  39. RUN chmod 700 /home/test/.ssh
  40. RUN chmod 600 /home/test/.ssh/authorized_keys
  41. RUN chmod 600 /home/test/.ssh/*rsa
  42.  
  43. # Configure sudo
  44.  
  45. RUN echo "test ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
  46.  
  47. # Start sshd on instantiation
  48.  
  49. ENTRYPOINT /usr/sbin/sshd && sleep inf