From 75c068ff290965bc8463dde563646404fe9189c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C=E4=BA=91?= Date: Tue, 17 Jun 2025 17:02:56 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E6=9B=B4=E6=96=B0=20Docker=20=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E5=B9=B6=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 Jenkinsfile,添加 8.4-swoole 版本构建和推送 - 修改 Latest 版本指向 8.4-swoole - 更新各版本 Dockerfile,设置时区为 America/Los_Angeles - 新增 8.4 版本 Dockerfile --- Jenkinsfile | 8 +++++++- swoole/7.4/Dockerfile | 3 ++- swoole/8.1/Dockerfile | 3 ++- swoole/8.2/Dockerfile | 3 ++- swoole/8.3/Dockerfile | 5 +++-- swoole/8.4/Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 swoole/8.4/Dockerfile diff --git a/Jenkinsfile b/Jenkinsfile index 1eecf74..6d0755d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,9 +26,15 @@ pipeline { sh 'docker push harbor.luxcreo.cn/library/hyperf:8.3-swoole' } } + stage('Build 8.4-swoole') { + steps { + sh 'docker build -t harbor.luxcreo.cn/library/hyperf:8.4-swoole -f swoole/8.4/Dockerfile .' + sh 'docker push harbor.luxcreo.cn/library/hyperf:8.4-swoole' + } + } stage('Build Latest') { steps { - sh 'docker tag harbor.luxcreo.cn/library/hyperf:8.3-swoole harbor.luxcreo.cn/library/hyperf:latest' + sh 'docker tag harbor.luxcreo.cn/library/hyperf:8.4-swoole harbor.luxcreo.cn/library/hyperf:latest' sh 'docker push harbor.luxcreo.cn/library/hyperf:latest' } } diff --git a/swoole/7.4/Dockerfile b/swoole/7.4/Dockerfile index d8e659c..11287b8 100644 --- a/swoole/7.4/Dockerfile +++ b/swoole/7.4/Dockerfile @@ -10,7 +10,7 @@ LABEL maintainer="李东云 " version="1.0" license="MIT" # ---------- env settings ---------- ## # --build-arg timezone=Asia/Shanghai -ENV TIMEZONE=Asia/Shanghai \ +ENV TIMEZONE=America/Los_Angeles \ SCAN_CACHEABLE=(true) \ COMPOSER_ALLOW_SUPERUSER=1 @@ -29,6 +29,7 @@ RUN set -ex \ echo "upload_max_filesize=128M"; \ echo "post_max_size=128M"; \ echo "memory_limit=1G"; \ + echo "date.timezone=${TIMEZONE}"; \ } | tee conf.d/99_overrides.ini \ # ---------- clear works ---------- && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ diff --git a/swoole/8.1/Dockerfile b/swoole/8.1/Dockerfile index c294523..f5ec5e3 100644 --- a/swoole/8.1/Dockerfile +++ b/swoole/8.1/Dockerfile @@ -10,7 +10,7 @@ LABEL maintainer="李东云 " version="1.0" license="MIT" # ---------- env settings ---------- ## # --build-arg timezone=Asia/Shanghai -ENV TIMEZONE=Asia/Shanghai \ +ENV TIMEZONE=America/Los_Angeles \ SCAN_CACHEABLE=(true) \ COMPOSER_ALLOW_SUPERUSER=1 @@ -29,6 +29,7 @@ RUN set -ex \ echo "upload_max_filesize=128M"; \ echo "post_max_size=128M"; \ echo "memory_limit=1G"; \ + echo "date.timezone=${TIMEZONE}"; \ } | tee conf.d/99_overrides.ini \ # ---------- clear works ---------- && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ diff --git a/swoole/8.2/Dockerfile b/swoole/8.2/Dockerfile index 237718b..a0f7b01 100644 --- a/swoole/8.2/Dockerfile +++ b/swoole/8.2/Dockerfile @@ -10,7 +10,7 @@ LABEL maintainer="李东云 " version="1.0" license="MIT" # ---------- env settings ---------- ## # --build-arg timezone=Asia/Shanghai -ENV TIMEZONE=Asia/Shanghai \ +ENV TIMEZONE=America/Los_Angeles \ SCAN_CACHEABLE=(true) \ COMPOSER_ALLOW_SUPERUSER=1 @@ -29,6 +29,7 @@ RUN set -ex \ echo "upload_max_filesize=128M"; \ echo "post_max_size=128M"; \ echo "memory_limit=1G"; \ + echo "date.timezone=${TIMEZONE}"; \ } | tee conf.d/99_overrides.ini \ # ---------- clear works ---------- && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ diff --git a/swoole/8.3/Dockerfile b/swoole/8.3/Dockerfile index 3c730d0..fb16e37 100644 --- a/swoole/8.3/Dockerfile +++ b/swoole/8.3/Dockerfile @@ -3,14 +3,14 @@ # @link https://studio.luxcreo.cn/ # @contact dongyun.li@luxcreo.cn -FROM hyperf/hyperf:8.3-alpine-vedge-swoole +FROM hyperf/hyperf:8.3-alpine-vedge-swoole-slim LABEL maintainer="李东云 " version="1.0" license="MIT" app.name="LuxHyperf" ## # ---------- env settings ---------- ## # --build-arg timezone=Asia/Shanghai -ENV TIMEZONE=Asia/Shanghai \ +ENV TIMEZONE=America/Los_Angeles \ SCAN_CACHEABLE=(true) \ COMPOSER_ALLOW_SUPERUSER=1 @@ -29,6 +29,7 @@ RUN set -ex \ echo "upload_max_filesize=128M"; \ echo "post_max_size=128M"; \ echo "memory_limit=1G"; \ + echo "date.timezone=${TIMEZONE}"; \ } | tee conf.d/99_overrides.ini \ # ---------- clear works ---------- && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ diff --git a/swoole/8.4/Dockerfile b/swoole/8.4/Dockerfile new file mode 100644 index 0000000..d182c1d --- /dev/null +++ b/swoole/8.4/Dockerfile @@ -0,0 +1,42 @@ +# Default Dockerfile +# +# @link https://studio.luxcreo.cn/ +# @contact dongyun.li@luxcreo.cn + +FROM hyperf/hyperf:8.4-alpine-vedge-swoole-slim +LABEL maintainer="李东云 " version="1.0" license="MIT" app.name="LuxHyperf" + +## +# ---------- env settings ---------- +## +# --build-arg timezone=Asia/Shanghai +ENV TIMEZONE=America/Los_Angeles \ + SCAN_CACHEABLE=(true) \ + COMPOSER_ALLOW_SUPERUSER=1 + +# update +RUN set -ex \ + && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ + # show php version and extensions + && php -v \ + && php -m \ + && php --ri swoole \ + && apk add --no-cache --repository http://mirrors.aliyun.com/alpine/edge/community gnu-libiconv \ + # ---------- some config ---------- + && cd /etc/php84 \ + # - config PHP + && { \ + echo "upload_max_filesize=128M"; \ + echo "post_max_size=128M"; \ + echo "memory_limit=1G"; \ + echo "date.timezone"; \ + } | tee conf.d/99_overrides.ini \ + # ---------- clear works ---------- + && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ + && echo -e "\033[42;37m Build Completed :).\033[0m\n" + +ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php + +WORKDIR /srv/www + +EXPOSE 9501 \ No newline at end of file