diff --git a/Dockerfile b/Dockerfile index 1bb8a897d..f0660f657 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,11 @@ RUN CFLAGS="-O0" install-php-extensions pcntl && \ CFLAGS="-O0 -g0" install-php-extensions bcmath && \ install-php-extensions zip && \ install-php-extensions redis && \ - apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis && \ + apk --no-cache add shadow sqlite mysql-client mysql-dev mariadb-connector-c git patch supervisor redis tzdata && \ + ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + echo "Asia/Shanghai" > /etc/timezone && \ + mkdir -p /usr/local/etc/php/conf.d && \ + echo "date.timezone = Asia/Shanghai" > /usr/local/etc/php/conf.d/timezone.ini && \ addgroup -S -g 1000 www && adduser -S -G www -u 1000 www && \ (getent group redis || addgroup -S redis) && \ (getent passwd redis || adduser -S -G redis -H -h /data redis) @@ -41,4 +45,4 @@ ENV ENABLE_WEB=true \ ENABLE_REDIS=false EXPOSE 7001 -CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] \ No newline at end of file +CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]