Dockerfile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM debian:buster
  2. MAINTAINER Abram Connelly <abram@clementinecomputing.com>
  3. RUN \
  4. apt-get update && \
  5. apt-get -y upgrade && \
  6. apt-get clean
  7. RUN \
  8. apt-get install -y gcc perl \
  9. git openssh-server sqlite3 libdbd-sqlite3-perl \
  10. default-mysql-server apache2 \
  11. netcat telnet wget
  12. RUN \
  13. apt-get install -y libswitch-perl libdate-calc-perl
  14. RUN \
  15. useradd -m bus && \
  16. echo 'bus:bus' | chpasswd
  17. RUN \
  18. su bus -c " cd /home/bus && \
  19. git clone https://tree.clementinecomputing.com/clementinecomputing/popufare && \
  20. mkdir -p /home/bus/.ssh && chmod 0700 /home/bus/.ssh "
  21. ## setup test ssh access
  22. ##
  23. ## WARNING: this MUST be changed for anything other than testing purposes
  24. ##
  25. COPY ./snakeoil_id_rsa.pub /home/bus/.ssh/authorized_keys.snakeoil
  26. RUN su bus -c \
  27. " cat /home/bus/.ssh/authorized_keys.snakeoil >> /home/bus/.ssh/authorized_keys && \
  28. chmod 640 /home/bus/.ssh/authorized_keys "
  29. # non-essential but helpful for debuggin/admin
  30. #
  31. RUN \
  32. apt-get install -y vim
  33. # main startup scripts
  34. #
  35. COPY ./startup_and_persist.sh /root/startup_and_persist.sh
  36. RUN \
  37. chmod u+x /root/startup_and_persist.sh
  38. EXPOSE 80 22 443 6055 2857 7277 2455 3556 8377
  39. CMD ["/root/startup_and_persist.sh"]