mirror of
http://124.126.16.154:8888/singularity/hdk-skeleton.git
synced 2026-01-15 05:15:06 +08:00
42 lines
1.1 KiB
Docker
42 lines
1.1 KiB
Docker
# Default Dockerfile
|
|
#
|
|
# @link https://studio.luxcreo.cn/
|
|
# @contact dongyun.li@luxcreo.cn
|
|
|
|
FROM harbor.luxcreo.cn/library/hyperf:8.2-swoole
|
|
LABEL maintainer="李东云 <dongyun.li@luxcreo.ai>" version="1.0" license="MIT"
|
|
|
|
##
|
|
# ---------- env settings ----------
|
|
##
|
|
# --build-arg timezone=Asia/Shanghai
|
|
ARG timezone
|
|
ARG app_env
|
|
ARG site
|
|
|
|
ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \
|
|
APP_ENV=${app_env:-"develop"} \
|
|
SITE=${site:-"CN"}
|
|
|
|
# 设置时区
|
|
RUN set -ex \
|
|
# ---------- some config ----------
|
|
&& cd /etc/php82 \
|
|
# - config PHP
|
|
&& echo "date.timezone=${TIMEZONE}" >> conf.d/99_overrides.ini \
|
|
# - config timezone
|
|
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
|
|
&& echo "${TIMEZONE}" > /etc/timezone \
|
|
# ---------- clear works ----------
|
|
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
|
|
|
|
# Composer Cache
|
|
#COPY auth.json /root/.composer/auth.json
|
|
COPY composer.* ./
|
|
RUN composer install --no-dev --no-scripts
|
|
|
|
COPY . ./
|
|
RUN composer dump-autoload -o && php bin/hyperf.php
|
|
|
|
ENTRYPOINT ["php", "/srv/www/bin/hyperf.php", "start"]
|