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 install apt-utils
  10. RUN apt-get -y dist-upgrade
  11. RUN apt-get -y upgrade
  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. # Add sandboxes to hosts file
  19.  
  20. RUN cat common/etc/dockersand.hosts >> /etc/hosts
  21.  
  22. # Enable sshd with same keys each time
  23. ADD common/keys/ /etc/ssh/
  24. RUN mkdir /var/run/sshd
  25.  
  26. # Setup and configure user: root
  27.  
  28. ADD common/.ssh/ /root/.ssh/
  29. RUN chmod 700 /root
  30. RUN mkdir /root/tmp
  31. RUN chown -R root:root /root
  32. RUN chmod 700 /root/.ssh
  33. RUN chmod 600 /root/.ssh/authorized_keys
  34. RUN chmod 600 /root/.ssh/*rsa
  35.  
  36. # Setup and configure user: test
  37.  
  38. RUN useradd -m -p snLOSb4wiVD0k -u 1000 -s /bin/bash test
  39. ADD common/.ssh/ /home/test/.ssh/
  40. RUN chmod 700 /home/test
  41. RUN mkdir /home/test/tmp
  42. RUN chown -R test:test /home/test
  43. RUN chmod 700 /home/test/.ssh
  44. RUN chmod 600 /home/test/.ssh/authorized_keys
  45. RUN chmod 600 /home/test/.ssh/*rsa
  46.  
  47. # Configure sudo
  48.  
  49. RUN echo "test ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
  50.  
  51. # Start sshd on instantiation
  52.  
  53. ENTRYPOINT /usr/sbin/sshd && sleep inf