Dockerfile 790 B

12345678910111213141516
  1. FROM php:5.6-fpm
  2. RUN pecl install xdebug-2.5.3 \
  3. && docker-php-ext-enable xdebug
  4. COPY 99-xdebug.ini /usr/local/etc/php/conf.d/
  5. RUN apt update && apt install -y openssh-server supervisor
  6. RUN mkdir /var/run/sshd
  7. RUN sed -i -e 's/PermitRootLogin without-password/PermitRootLogin yes/' -e '/AuthorizedKeysFile/s/^# *//' -e '/UsePrivilegeSeparation/s/yes/no/' /etc/ssh/sshd_config
  8. RUN echo 'root:mypassword' | chpasswd
  9. #RUN mkdir /root/.ssh && ssh-keygen -t rsa -P "" -C "SSH Client Key for XDebug" -f /root/.ssh/xdebug_client && cat /root/.ssh/xdebug_client.pub >> /root/.ssh/authorized_keys
  10. COPY supervisor_app.conf /etc/supervisor/conf.d/
  11. RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
  12. EXPOSE 80 443 22
  13. CMD ["supervisord", "-n"]