Created
December 25, 2018 08:54
-
-
Save oraoto/1731bf53a3d8637ed4bb09ad78137ce5 to your computer and use it in GitHub Desktop.
swoole dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.3 | |
COPY mirrors /etc/apt/sources.list | |
ARG SWOOLE_VERSION=4.2.9 | |
RUN rm /etc/apt/sources.list.d -r \ | |
&& apt-get update \ | |
&& apt-get install libssl-dev git -y \ | |
&& docker-php-ext-install pdo_mysql sockets \ | |
&& curl -o swoole.tgz https://pecl.php.net/get/swoole-${SWOOLE_VERSION}.tgz \ | |
&& echo 'yes\nyes\nno\nyes\nno\nno' | pecl install ./swoole.tgz \ | |
&& rm ./swoole.tgz \ | |
&& docker-php-ext-enable swoole \ | |
&& curl -s -o /usr/local/bin/composer https://dl.laravel-china.org/composer.phar \ | |
&& chmod a+x /usr/local/bin/composer \ | |
&& apt-get clean | |
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini \ | |
&& sed 's/;date.timezone =/date.timezone = Asia\/Shanghai/' -i /usr/local/etc/php/php.ini | |
RUN useradd -u 1000 -G www-data -m deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free | |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main contrib non-free | |
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free | |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main contrib non-free | |
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free | |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main contrib non-free | |
deb http://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free | |
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security stretch/updates main contrib non-free |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment