diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.ignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a19b57d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,43 @@ +FROM php:7.2.34-fpm-alpine3.12 + +# 环境变量 +ENV COMPOSER_ALLOW_SUPERUSER=1 \ + COMPOSER_HOME=/composer + +# 安装依赖 + 常用扩展 +RUN apk add --no-cache \ + bash \ + git \ + curl \ + wget \ + unzip \ + libzip-dev \ + openssl \ + openssl-dev \ + pcre \ + pcre-dev \ + zlib \ + zlib-dev \ + icu-dev \ + build-base \ + && docker-php-ext-install \ + pdo_mysql \ + mysqli \ + mbstring \ + opcache \ + zip \ + # 安装 swoole(固定版本,兼容 php7.2) + && pecl install swoole-4.8.12 \ + && docker-php-ext-enable swoole \ + # 安装 redis 扩展(最后一个支持 php7.2 的版本) + && pecl install redis-5.3.7 \ + && docker-php-ext-enable redis \ + # 安装 composer + && curl -sS https://getcomposer.org/installer | php -- \ + --install-dir=/usr/local/bin --filename=composer \ + # 清理 + && apk del build-base \ + && rm -rf /tmp/pear ~/.pearrc /var/cache/apk/* + +# 工作目录 +WORKDIR /www/wwwroot/admin