hamlet-swoole.dockerfile 662 B

123456789101112131415161718192021
  1. FROM php:7.2
  2. ENV SWOOLE_VERSION=4.0.4
  3. RUN cd /tmp && curl -sSL "https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz" | tar xzf - \
  4. && cd swoole-src-${SWOOLE_VERSION} \
  5. && phpize && ./configure > /dev/null && make > /dev/null && make install > /dev/null \
  6. && docker-php-ext-enable swoole
  7. RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
  8. RUN apt-get update && apt-get install -y git unzip
  9. RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  10. ADD ./ /hamlet
  11. WORKDIR /hamlet
  12. RUN chmod -R 777 /hamlet
  13. RUN composer update
  14. CMD php /hamlet/swoole.php