mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-05 21:28:15 +08:00
4b78aeaaaf
* Don't retry, when recv timeout for json-rpc client.
50 lines
1.3 KiB
Docker
50 lines
1.3 KiB
Docker
# Default Dockerfile
|
|
#
|
|
# @link https://www.hyperf.io
|
|
# @document https://hyperf.wiki
|
|
# @contact group@hyperf.io
|
|
# @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
|
|
|
FROM hyperf/hyperf:7.4-alpine-v3.12-swoole
|
|
LABEL maintainer="Hyperf Developers <group@hyperf.io>" version="1.0" license="MIT" app.name="ky_meditation"
|
|
|
|
##
|
|
# ---------- env settings ----------
|
|
##
|
|
# --build-arg timezone=Asia/Shanghai
|
|
ARG timezone
|
|
|
|
ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \
|
|
APP_ENV=prod \
|
|
SCAN_CACHEABLE=(true)
|
|
|
|
# update
|
|
RUN set -ex \
|
|
# show php version and extensions
|
|
&& php -v \
|
|
&& php -m \
|
|
&& php --ri swoole \
|
|
# ---------- some config ----------
|
|
&& cd /etc/php7 \
|
|
# - config PHP
|
|
&& { \
|
|
echo "upload_max_filesize=128M"; \
|
|
echo "post_max_size=128M"; \
|
|
echo "memory_limit=1G"; \
|
|
echo "date.timezone=${TIMEZONE}"; \
|
|
} | tee conf.d/99_overrides.ini \
|
|
# - config timezone
|
|
&& ln -sf /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
|
|
&& echo "${TIMEZONE}" > /etc/timezone \
|
|
# ---------- clear works ----------
|
|
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
|
|
&& echo -e "\033[42;37m Build Completed :).\033[0m\n"
|
|
|
|
WORKDIR /opt/www
|
|
|
|
COPY . /opt/www
|
|
|
|
EXPOSE 10001
|
|
|
|
ENTRYPOINT ["php", "/opt/www/tcp_server.php"]
|