Dockerfile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. FROM docker.infra.flowdat.com/fd3/sf-php:latest
  2. ENV DEBIAN_FRONTEND noninteractive
  3. ENV NOTVISIBLE "in users profile"
  4. EXPOSE 22 80/tcp 37 69/udp 123/udp
  5. COPY sshd_config /etc/ssh/sshd_config
  6. COPY . /etc/supervisord
  7. WORKDIR /opt
  8. RUN echo Acquire::http::Proxy "http://aptcache.infra.flowdat.com/"; > /etc/apt/apt.conf.d/00aptproxyi; \
  9. apt-get update; \
  10. apt-get install -yq parallel lockfile-progs expect telnet atftp atftpd xinetd busybox \
  11. sudo cron patch openssh-server; \
  12. pip install supervisor; \
  13. mkdir -p /var/log/supervisor/; \
  14. mkdir /var/run/sshd; \
  15. sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd; \
  16. echo "export VISIBLE=now" >> /etc/profile; \
  17. mkdir -p /etc/ssh/keys/; \
  18. cp keys/bitbucket.id_rsa.pub /etc/ssh/keys/authorized_keys; \
  19. cp keys/bitbucket.id_rsa /etc/ssh/keys/bitbucket.id_rsa; \
  20. chmod 0600 /etc/ssh/keys; \
  21. chmod 0600 /etc/ssh/keys/authorized_keys; \
  22. chown root:root -R /etc/ssh/keys; \
  23. bash -c '/etc/supervisord/src/install-tftp.sh'; \
  24. bash -c '/etc/supervisord/src/install-tod.sh'; \
  25. touch /var/log/cron.log; \
  26. mkdir -p /tftpboot; \
  27. chmod 777 /tftpboot; \
  28. rm -rf /var/lib/apt/lists/*
  29. CMD ["sh", "-c", "busybox syslogd -n -O /dev/stdout & supervisord -c /etc/supervisord/supervisor.conf -n"]