19 lines
592 B
Docker
Raw Normal View History

2018-11-28 17:47:22 +08:00
FROM php:7.2
WORKDIR /root
2019-01-30 23:47:32 +08:00
RUN echo "Asia/Shanghai" > /etc/timezone
RUN dpkg-reconfigure -f noninteractive tzdata
ENV LANG C.UTF-8
RUN apt-get update && apt-get install curl libxml2 libzip-dev openssl git -y
2018-11-28 17:47:22 +08:00
# Install php extensions
2019-01-30 23:47:32 +08:00
RUN docker-php-ext-install zip
RUN docker-php-ext-install mysqli
RUN docker-php-ext-install iconv
RUN docker-php-ext-install mbstring
2018-11-28 17:47:22 +08:00
RUN pecl install swoole
RUN docker-php-ext-enable swoole
VOLUME ["/root/"]
2019-01-30 23:47:32 +08:00
CMD if [ ! -d "CQBot-swoole" ]; then git clone https://github.com/crazywhalecc/CQBot-swoole.git; fi && cd CQBot-swoole/ && bash -c "php start.php"