1 Star 0 Fork 101

pwup/yiicms

forked from 七觞酒/yiicms 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.60 KB
一键复制 编辑 原始数据 按行查看 历史
七觞酒 提交于 2020-02-06 11:44 . fix bug
FROM php:7.1-fpm-alpine
COPY . /var/www/yiicms
COPY ./nginx.conf /etc/nginx/conf.d/yiicms.conf
RUN MAIN_VERSION=$(cat /etc/alpine-release | cut -d '.' -f 0-2) \
&& mv /etc/apk/repositories /etc/apk/repositories-bak \
&& { \
echo "https://mirrors.aliyun.com/alpine/v${MAIN_VERSION}/main"; \
echo "https://mirrors.aliyun.com/alpine/v${MAIN_VERSION}/community"; \
} >> /etc/apk/repositories && \
apk add --no-cache nginx && \
mkdir -p /run/nginx && \
rm -f /etc/nginx/conf.d/default.conf && \
#php mysql-pdo gd2
docker-php-ext-install pdo_mysql && \
apk add freetype freetype-dev libpng-dev libjpeg-turbo libjpeg-turbo-dev && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install -j$(nproc) gd && \
apk del freetype-dev libpng-dev libjpeg-turbo-dev && \
rm -f /var/cache/apk/* && \
cp -f "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" && \
cp -f /var/www/yiicms/config/db.php.default /var/www/yiicms/config/db.php && \
sed -i -e "s/'dsn' => 'mysql:host=localhost;dbname=yiicms',/'dsn' => 'mysql:host=mysql;dbname=yiicms',/g" /var/www/yiicms/config/db.php && \
sed -i -e "s/'username' => 'root',/'username' => 'yiicms',/g" /var/www/yiicms/config/db.php && \
chmod -Rf 777 /var/www/yiicms/runtime && \
chmod -Rf 777 /var/www/yiicms/web/uploads && \
chmod -Rf 777 /var/www/yiicms/web/assets && \
mkdir -p /var/www/sh && \
echo -e "#!/bin/sh\n/usr/sbin/nginx\n/usr/local/sbin/php-fpm\n" >> /var/www/sh/start.sh
ENTRYPOINT [ "/bin/sh", "/var/www/sh/start.sh" ]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/pwup/yiicms.git
git@gitee.com:pwup/yiicms.git
pwup
yiicms
yiicms
master

搜索帮助