From d4680e40fec120473d30cb4404b15ddda1f5f126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C=E4=BA=91?= Date: Sun, 24 Apr 2022 14:58:52 +0800 Subject: [PATCH] =?UTF-8?q?init(git):=20=F0=9F=8E=89=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96git=E5=AD=90=E4=BB=93=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ Jenkinsfile | 15 +++++++++++++++ swoole/8.0/Dockerfile | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 Jenkinsfile create mode 100644 swoole/8.0/Dockerfile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a95508 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +.vscode/ \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..aec76b0 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,15 @@ +pipeline { + + stages { + stage('Build 8.0-swoole') { + agent { + docker { image 'plugins/docker' } + } + steps { + sh 'docker login harbor.luxcreo.cn -u ' + sh 'docker build -t harbor.luxcreo.cn/library/hyperf:8.0-swoole -f swoole/8.0/Dockerfile .' + sh 'docker push harbor.luxcreo.cn/library/hyperf:8.0-swoole' + } + } + } +} \ No newline at end of file diff --git a/swoole/8.0/Dockerfile b/swoole/8.0/Dockerfile new file mode 100644 index 0000000..51c05e5 --- /dev/null +++ b/swoole/8.0/Dockerfile @@ -0,0 +1,42 @@ +# Default Dockerfile +# +# @link https://studio.luxcreo.cn/ +# @contact dongyun.li@luxcreo.cn + +FROM hyperf/hyperf:8.0-alpine-v3.14-swoole +LABEL maintainer="李东云 " version="1.0" license="MIT" app.name="LuxHyperf" + +## +# ---------- env settings ---------- +## +# --build-arg timezone=Asia/Shanghai +ENV TIMEZONE=Asia/Shanghai \ + SCAN_CACHEABLE=(true) + +# update +RUN set -ex \ + # show php version and extensions + && php -v \ + && php -m \ + && php --ri swoole \ + # ---------- some config ---------- + && cd /etc/php8 \ + # - 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 /srv/www + +EXPOSE 9501 + +ENTRYPOINT ["php", "/srv/www/bin/hyperf.php", "start"]