diff --git a/.env.example b/.env.example index c586ab4c1..bf5a63e83 100644 --- a/.env.example +++ b/.env.example @@ -13,8 +13,9 @@ APP_ENV=development APP_ROOT=./app # APP_ROOT=../app -# 项目存储在 WSL2, WSL2 中的路径,请同时在 .env.ps1 中设置 $WSL2_DIST -# APP_ROOT=/app +# 项目存储在 WSL2 +# 格式 APP_ROOT=\\wsl$\\ +# APP_ROOT=\\wsl$\debian\app ################################################################################ @@ -123,25 +124,25 @@ TZ=Asia/Shanghai LNMP_NGINX_VERSION=1.23.3 -LNMP_MYSQL_VERSION=8.0.30 +LNMP_MYSQL_VERSION=8.0.33 -LNMP_PHP_VERSION=8.1.9 +LNMP_PHP_VERSION=8.2.3 # LNMP_PHP_VERSION=nightly # EOL LNMP_PHP5_VERSION=5.6.37 LNMP_PHP56_VERSION=5.6.37 -LNMP_PHP7_VERSION=7.4.32 +LNMP_PHP7_VERSION=7.4.33 LNMP_PHP70_VERSION=7.0.33 LNMP_PHP71_VERSION=7.1.33 LNMP_PHP72_VERSION=7.2.34 LNMP_PHP73_VERSION=7.3.33 +LNMP_PHP74_VERSION=7.4.33 # EOL -LNMP_PHP74_VERSION=7.4.32 -LNMP_PHP8_VERSION=8.1.9 -LNMP_PHP80_VERSION=8.0.23 -LNMP_PHP81_VERSION=8.1.9 -LNMP_PHP82_VERSION=8.2.0 +LNMP_PHP8_VERSION=8.2.3 +LNMP_PHP80_VERSION=8.0.26 +LNMP_PHP81_VERSION=8.1.12 +LNMP_PHP82_VERSION=8.2.3 LNMP_REDIS_VERSION=7.0.0 diff --git a/.env.example.ps1 b/.env.example.ps1 index 1885d16f1..ba0d2484c 100644 --- a/.env.example.ps1 +++ b/.env.example.ps1 @@ -5,9 +5,9 @@ $CI_HOST="ci.khs1994.com:1218" # wsl name # $ wslconfig /l # $ wsl -l -$DistributionName="Ubuntu-18.04" +$DistributionName="Ubuntu-22.04" -$LNMP_PHP_IMAGE="khs1994/php:8.1.9-composer-alpine" +$LNMP_PHP_IMAGE="khs1994/php:8.2.3-composer-alpine" $NGINX_PATH="C:/nginx" $PHP_PATH="C:/php" @@ -20,10 +20,6 @@ $LNMP_NODE_IMAGE="node:alpine" # $LNMP_CACHE= -# 项目存储在 WSL2 -# 推荐使用 Ubuntu,其他系统(例如 alpine)可能会遇到错误 -# $WSL2_DIST="Ubuntu" - # 挂载物理硬盘到 WSL2 # $ wmic diskdrive list brief # $MountPhysicalDiskDeviceID2WSL2="\\.\PHYSICALDRIVE0" diff --git a/.github/actions/setup-php/.github/workflows/ci.yaml b/.github/actions/setup-php/.github/workflows/ci.yaml index 04a2081aa..90d6be012 100644 --- a/.github/actions/setup-php/.github/workflows/ci.yaml +++ b/.github/actions/setup-php/.github/workflows/ci.yaml @@ -10,10 +10,11 @@ jobs: matrix: php_version: - nightly - - 8.1.9 - - 8.0.23 - - 7.4.32 + - 8.2.3 + - 8.1.12 + - 8.0.26 # EOL + - 7.4.33 - 7.3.33 - 7.2.34 - 7.1.33 diff --git a/.github/actions/setup-php/action.yml b/.github/actions/setup-php/action.yml index e3da4264a..aeaf9189c 100644 --- a/.github/actions/setup-php/action.yml +++ b/.github/actions/setup-php/action.yml @@ -6,7 +6,7 @@ author: 'khs1994' inputs: php_version: description: PHP version - default: "8.1.9" + default: "8.2.3" required: false php_type: description: php image type, fpm | composer | swoole | php-cs-fixer | doctum diff --git a/.github/actions/setup-php/package.json b/.github/actions/setup-php/package.json index 31002d149..b2c6587fb 100644 --- a/.github/actions/setup-php/package.json +++ b/.github/actions/setup-php/package.json @@ -12,7 +12,7 @@ }, "devDependencies": {}, "scripts": { - "test": "cross-env RUNNER_WORKSPACE='/home/runner/work/php-demo' INPUT_ARGS=\"php -v ; env\" INPUT_PHP_VERSION='8.1.9' INPUT_PHP_TYPE=composer INPUT_JOB_CONTAINER_NETWORK=test node lib/setup-php" + "test": "cross-env RUNNER_WORKSPACE='/home/runner/work/php-demo' INPUT_ARGS=\"php -v ; env\" INPUT_PHP_VERSION='8.2.3' INPUT_PHP_TYPE=composer INPUT_JOB_CONTAINER_NETWORK=test node lib/setup-php" }, "author": "", "license": "ISC" diff --git a/.github/labeler.yml b/.github/labeler.yml index 35d445ed1..6c899e1e3 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -5,7 +5,7 @@ lnmp/app: lnmp/cli: - bin/**/* -- cli/**/* +- scripts/cli/**/* - lnmp-docker - lnmp-docker.ps1 - lnmp-docker-custom-script.example @@ -26,7 +26,7 @@ lnmp/core: - docker-lnmp.yml - docker-windows.yml - bin/**/* -- cli/**/* +- scripts/cli/**/* - lnmp-docker - lnmp-docker.ps1 - lnmp-docker-custom-script.example diff --git a/.github/workflows/check-link.yml b/.github/workflows/check-link.yml index 8544736f6..3501641af 100644 --- a/.github/workflows/check-link.yml +++ b/.github/workflows/check-link.yml @@ -28,7 +28,6 @@ jobs: "docker.domain.com","YourIP","register",\ "https://www.freedesktop.org/wiki/Software/systemd/",\ "cloud.tencent.com",\ - "zan.khs1994.com",\ "storage.khs1994.com",\ "test2.t.khs1994.com",\ "harbor.t.khs1994.com",\ diff --git a/.github/workflows/lwpm-dist-file.yaml b/.github/workflows/lwpm-dist-file.yaml index a59d5d92e..6f428617c 100644 --- a/.github/workflows/lwpm-dist-file.yaml +++ b/.github/workflows/lwpm-dist-file.yaml @@ -42,7 +42,7 @@ jobs: if: matrix.os == 'ubuntu' && contains( github.event.head_commit.message, '[k8s]') env: - VERSION: 1.6.7 + VERSION: 1.7.0 run: | ./lnmp/windows/lnmp-windows-pm.ps1 dist containerd@${env:VERSION} ./lnmp/windows/lnmp-windows-pm.ps1 push containerd@${env:VERSION} @@ -51,7 +51,7 @@ jobs: if: matrix.os == 'windows' && contains( github.event.head_commit.message, '[k8s]') env: - VERSION: 1.26.0 + VERSION: 1.27.0 run: | ./lnmp/windows/lnmp-windows-pm.ps1 dist crictl@${env:VERSION} ./lnmp/windows/lnmp-windows-pm.ps1 push crictl@${env:VERSION} @@ -59,7 +59,7 @@ jobs: if: endsWith('a', 'b') shell: pwsh env: - VERSION: 3.5.4 + VERSION: 3.5.8 run: | ./lnmp/windows/lnmp-windows-pm.ps1 dist etcd@${env:VERSION} ./lnmp/windows/lnmp-windows-pm.ps1 push etcd@${env:VERSION} diff --git a/.github/workflows/lwpm-dist-k8s-file.yaml b/.github/workflows/lwpm-dist-k8s-file.yaml index aa2a9c035..116be165c 100644 --- a/.github/workflows/lwpm-dist-k8s-file.yaml +++ b/.github/workflows/lwpm-dist-k8s-file.yaml @@ -6,7 +6,7 @@ on: LWPM_K8S_VERSION: description: k8s version required: true - default: 1.26.0 + default: 1.27.0 env: LWPM_K8S_VERSION: ${{ github.event.inputs.LWPM_K8S_VERSION }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1aa27cc64..a25a88d2f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,61 +14,61 @@ jobs: matrix: include: - JOB_NAME: wsl-php-builder-74 - DIST_FILE: khs1994-wsl-php74_7.4.32-debian-bullseye_amd64.deb + DIST_FILE: khs1994-wsl-php74_7.4.33-debian-bullseye_amd64.deb - JOB_NAME: wsl-php-builder-80 - DIST_FILE: khs1994-wsl-php80_8.0.23-debian-bullseye_amd64.deb + DIST_FILE: khs1994-wsl-php80_8.0.26-debian-bullseye_amd64.deb - JOB_NAME: wsl-php-builder-81 - DIST_FILE: khs1994-wsl-php81_8.1.9-debian-bullseye_amd64.deb + DIST_FILE: khs1994-wsl-php81_8.1.12-debian-bullseye_amd64.deb - JOB_NAME: wsl-php-builder-nightly DIST_FILE: khs1994-wsl-php83_0.0.0-debian-bullseye_amd64.deb - JOB_NAME: wsl-php-builder-debian12-81 - DIST_FILE: khs1994-wsl-php81_8.1.9-debian-bookworm_amd64.deb + DIST_FILE: khs1994-wsl-php81_8.1.12-debian-bookworm_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu1804-74 - DIST_FILE: khs1994-wsl-php74_7.4.32-ubuntu-bionic_amd64.deb + DIST_FILE: khs1994-wsl-php74_7.4.33-ubuntu-bionic_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu1804-80 - DIST_FILE: khs1994-wsl-php80_8.0.23-ubuntu-bionic_amd64.deb + DIST_FILE: khs1994-wsl-php80_8.0.26-ubuntu-bionic_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu1804-81 - DIST_FILE: khs1994-wsl-php81_8.1.9-ubuntu-bionic_amd64.deb + DIST_FILE: khs1994-wsl-php81_8.1.12-ubuntu-bionic_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2004-74 - DIST_FILE: khs1994-wsl-php74_7.4.32-ubuntu-focal_amd64.deb + DIST_FILE: khs1994-wsl-php74_7.4.33-ubuntu-focal_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2004-80 - DIST_FILE: khs1994-wsl-php80_8.0.23-ubuntu-focal_amd64.deb + DIST_FILE: khs1994-wsl-php80_8.0.26-ubuntu-focal_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2004-81 - DIST_FILE: khs1994-wsl-php81_8.1.9-ubuntu-focal_amd64.deb + DIST_FILE: khs1994-wsl-php81_8.1.12-ubuntu-focal_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2204-74 - DIST_FILE: khs1994-wsl-php74_7.4.32-ubuntu-jammy_amd64.deb + DIST_FILE: khs1994-wsl-php74_7.4.33-ubuntu-jammy_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2204-80 - DIST_FILE: khs1994-wsl-php80_8.0.23-ubuntu-jammy_amd64.deb + DIST_FILE: khs1994-wsl-php80_8.0.26-ubuntu-jammy_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2204-81 - DIST_FILE: khs1994-wsl-php81_8.1.9-ubuntu-jammy_amd64.deb + DIST_FILE: khs1994-wsl-php81_8.1.12-ubuntu-jammy_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2204-nightly DIST_FILE: khs1994-wsl-php83_0.0.0-ubuntu-jammy_amd64.deb - JOB_NAME: wsl-php-builder-ubuntu2210-81 - DIST_FILE: khs1994-wsl-php81_8.1.9-ubuntu-kinetic_amd64.deb + DIST_FILE: khs1994-wsl-php81_8.1.12-ubuntu-kinetic_amd64.deb - JOB_NAME: wsl-php-builder-rhel7-74 - DIST_FILE: khs1994-wsl-php74-7.4.32-1.el7.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php74-7.4.33-1.el7.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rhel8-74 - DIST_FILE: khs1994-wsl-php74-7.4.32-1.el8.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php74-7.4.33-1.el8.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rhel8-80 - DIST_FILE: khs1994-wsl-php80-8.0.23-1.el8.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php80-8.0.26-1.el8.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rhel8-81 - DIST_FILE: khs1994-wsl-php81-8.1.9-1.el8.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php81-8.1.12-1.el8.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rhel9-74 - DIST_FILE: khs1994-wsl-php74-7.4.32-1.el9.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php74-7.4.33-1.el9.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rhel9-80 - DIST_FILE: khs1994-wsl-php80-8.0.23-1.el9.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php80-8.0.26-1.el9.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rhel9-81 - DIST_FILE: khs1994-wsl-php81-8.1.9-1.el9.centos.x86_64.rpm + DIST_FILE: khs1994-wsl-php81-8.1.12-1.el9.centos.x86_64.rpm - JOB_NAME: wsl-php-builder-rocky8-81 - DIST_FILE: khs1994-wsl-php81-8.1.9-1.el8.rocky.x86_64.rpm + DIST_FILE: khs1994-wsl-php81-8.1.12-1.el8.rocky.x86_64.rpm - JOB_NAME: wsl-php-builder-rocky9-81 - DIST_FILE: khs1994-wsl-php81-8.1.9-1.el9.rocky.x86_64.rpm + DIST_FILE: khs1994-wsl-php81-8.1.12-1.el9.rocky.x86_64.rpm - JOB_NAME: wsl-php-builder-fc36-74 - DIST_FILE: khs1994-wsl-php74-7.4.32-1.fc36.x86_64.rpm + DIST_FILE: khs1994-wsl-php74-7.4.33-1.fc36.x86_64.rpm - JOB_NAME: wsl-php-builder-fc36-80 - DIST_FILE: khs1994-wsl-php80-8.0.23-1.fc36.x86_64.rpm + DIST_FILE: khs1994-wsl-php80-8.0.26-1.fc36.x86_64.rpm - JOB_NAME: wsl-php-builder-fc36-81 - DIST_FILE: khs1994-wsl-php81-8.1.9-1.fc36.x86_64.rpm + DIST_FILE: khs1994-wsl-php81-8.1.12-1.fc36.x86_64.rpm - JOB_NAME: wsl-php-builder-fc36-nightly DIST_FILE: khs1994-wsl-php83-0.0.0-1.fc36.x86_64.rpm - JOB_NAME: wsl-php-builder-fc37-nightly @@ -96,19 +96,19 @@ jobs: gh release create $GITHUB_TAG -F CHANGELOG.md --target 20.10 -t $GITHUB_TAG || true # deb - sh cli/build.sh deb ${GITHUB_TAG} + sh scripts/cli/build.sh deb ${GITHUB_TAG} export VERSION=$( echo ${GITHUB_TAG} | cut -d "v" -f 2 ) export DEB_NAME=khs1994-docker-lnmp_${VERSION}_amd64.deb - ls -la cli - sudo dpkg -i cli/${DEB_NAME} - gh release upload ${GITHUB_TAG} cli/${DEB_NAME} --repo khs1994-docker/lnmp --clobber + ls -la scripts/cli + sudo dpkg -i scripts/cli/${DEB_NAME} + gh release upload ${GITHUB_TAG} scripts/cli/${DEB_NAME} --repo khs1994-docker/lnmp --clobber # rpm test $( echo "${GITHUB_TAG}" | grep alpha ) && exit 0 || true test $( echo "${GITHUB_TAG}" | grep beta ) && exit 0 || true test $( echo "${GITHUB_TAG}" | grep rc ) && exit 0 || true sudo apt install -y rpm - sh cli/build.sh rpm ${GITHUB_TAG} + sh scripts/cli/build.sh rpm ${GITHUB_TAG} export VERSION=$( echo ${GITHUB_TAG} | cut -d "v" -f 2 ) export RPM_NAME=$( cd $HOME; ls *.rpm ) ls -la ~/*.rpm diff --git a/.gitignore b/.gitignore index bbe5e340e..62ada1ebc 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ docker-compose-Linux-x86_64 /docker-workspace.yml /compose.yml /compose.yaml +/compose-up.yaml +/compose-up.yml # cache diff --git a/.pcit.yml b/.pcit.yml index 6fa2d0676..53e4e2907 100644 --- a/.pcit.yml +++ b/.pcit.yml @@ -4,7 +4,7 @@ workspace: steps: bash: - image: khs1994/php:8.1.9-composer-alpine + image: khs1994/php:8.2.3-composer-alpine run: - pwd - bash ./lnmp-docker diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b99846718..e1e36894a 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -13,7 +13,7 @@ "ms-vscode-remote.remote-wsl", "ms-vscode-remote.remote-containers", // "ms-vscode-remote.remote-ssh", - "ms-vscode.powershell-preview", + "ms-vscode.powershell", "editorconfig.editorconfig", "ivory-lab.jenkinsfile-support", // "ms-python.vscode-pylance", diff --git a/README.cn.md b/README.cn.md index 34ffd60d7..b22094d9c 100644 --- a/README.cn.md +++ b/README.cn.md @@ -57,9 +57,9 @@ :one: [Git](https://mirrors.huaweicloud.com/git-for-windows/) -:two: [Docker CE](https://github.com/yeasy/docker_practice/tree/master/install) 19.03 Stable + +:two: [Docker](https://github.com/yeasy/docker_practice/tree/master/install) 20.10 Stable + -:three: [Docker Compose V2](https://github.com/yeasy/docker_practice/blob/master/compose/install.md) +:three: [Docker Compose v2.17.0+](https://github.com/yeasy/docker_practice/blob/master/compose/install.md) :four: WSL (**Windows** Only) @@ -202,13 +202,13 @@ $ ./lnmp-docker down |:-- |:-- |:-- |:-- | |[ACME.sh](https://github.com/acmesh-official/acme.sh) |`khs1994/acme:3.0.0` | **3.0.0** |`alpine:3.16` | |[NGINX](https://github.com/khs1994-docker/nginx) |`nginx:1.23.3-alpine` | **1.23.3** |`alpine:3.13` | -|[NGINX Unit](https://github.com/nginx/unit) |`khs1994/php:8.1.9-unit-alpine`| **1.28.0** |`alpine:3.16` | +|[NGINX Unit](https://github.com/nginx/unit) |`khs1994/php:8.2.3-unit-alpine`| **1.28.0** |`alpine:3.16` | |[HTTPD](https://github.com/docker-library/docs/tree/master/httpd) |`httpd:2.4.53-alpine` | **2.4.53** |`alpine:3.16` | -|[MySQL](https://github.com/docker-library/docs/tree/master/mysql) |`mysql:8.0.30` | **8.0.30** |`oraclelinux:8-slim`| +|[MySQL](https://github.com/docker-library/docs/tree/master/mysql) |`mysql:8.0.33` | **8.0.33** |`oraclelinux:8-slim`| |[MariaDB](https://github.com/docker-library/docs/tree/master/mariadb) |`mariadb:10.8.3` | **10.8.3** |`ubuntu:jammy` | |[Redis](https://github.com/docker-library/docs/tree/master/redis) |`redis:7.0.0-alpine` | **7.0.0** |`alpine:3.16` | -|[PHP-FPM](https://github.com/khs1994-docker/php) |`khs1994/php:8.1.9-fpm-alpine` | **8.1.9** |`alpine:3.16` | -|[Composer](https://github.com/docker-library/docs/tree/master/composer) |`khs1994/php:8.1.9-composer-alpine`| **2.5.1** |`alpine:3.16` | +|[PHP-FPM](https://github.com/khs1994-docker/php) |`khs1994/php:8.2.3-fpm-alpine` | **8.2.3** |`alpine:3.16` | +|[Composer](https://github.com/docker-library/docs/tree/master/composer) |`khs1994/php:8.2.3-composer-alpine`| **2.5.5** |`alpine:3.16` | |[Memcached](https://github.com/docker-library/docs/tree/master/memcached) |`memcached:1.6.15-alpine` | **1.6.15** |`alpine:3.16` | |[RabbitMQ](https://github.com/docker-library/docs/tree/master/rabbitmq) |`rabbitmq:3.9.0-management-alpine` | **3.9.0** |`alpine:3.13` | |[PostgreSQL](https://github.com/docker-library/docs/tree/master/postgres) |`postgres:14.0-alpine` | **14.0** |`alpine:3.14` | diff --git a/README.md b/README.md index 29ca8e12a..686287b83 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,9 @@ To use LNMP Docker, you need: :one: [Git](https://git-scm.com/downloads) -:two: [Docker CE](https://github.com/yeasy/docker_practice/tree/master/install) 19.03 Stable + +:two: [Docker](https://github.com/yeasy/docker_practice/tree/master/install) 20.10 Stable + -:three: [Docker Compose V2](https://github.com/yeasy/docker_practice/blob/master/compose/install.md) +:three: [Docker Compose v2.17.0+](https://github.com/yeasy/docker_practice/blob/master/compose/install.md) :four: WSL (**Windows** Only) @@ -197,13 +197,13 @@ Please see [Documents](https://github.com/khs1994-docker/lnmp/tree/master/docs#% |:-- |:-- |:-- |:-- | |[ACME.sh](https://github.com/acmesh-official/acme.sh) |`khs1994/acme:3.0.0` | **3.0.0** |`alpine:3.16` | |[NGINX](https://github.com/khs1994-docker/nginx) |`nginx:1.23.3-alpine` | **1.23.3** |`alpine:3.13` | -|[NGINX Unit](https://github.com/nginx/unit) |`khs1994/php:8.1.9-unit-alpine`| **1.28.0** |`alpine:3.16` | +|[NGINX Unit](https://github.com/nginx/unit) |`khs1994/php:8.2.3-unit-alpine`| **1.28.0** |`alpine:3.16` | |[HTTPD](https://github.com/docker-library/docs/tree/master/httpd) |`httpd:2.4.53-alpine` | **2.4.53** |`alpine:3.16` | -|[MySQL](https://github.com/docker-library/docs/tree/master/mysql) |`mysql:8.0.30` | **8.0.30** |`oraclelinux:8-slim`| +|[MySQL](https://github.com/docker-library/docs/tree/master/mysql) |`mysql:8.0.33` | **8.0.33** |`oraclelinux:8-slim`| |[MariaDB](https://github.com/docker-library/docs/tree/master/mariadb) |`mariadb:10.8.3` | **10.8.3** |`ubuntu:jammy` | |[Redis](https://github.com/docker-library/docs/tree/master/redis) |`redis:7.0.0-alpine` | **7.0.0** |`alpine:3.16` | -|[PHP-FPM](https://github.com/khs1994-docker/php) |`khs1994/php:8.1.9-fpm-alpine` | **8.1.9** |`alpine:3.16` | -|[Composer](https://github.com/docker-library/docs/tree/master/composer) |`khs1994/php:8.1.9-composer-alpine`| **2.5.1** |`alpine:3.16` | +|[PHP-FPM](https://github.com/khs1994-docker/php) |`khs1994/php:8.2.3-fpm-alpine` | **8.2.3** |`alpine:3.16` | +|[Composer](https://github.com/docker-library/docs/tree/master/composer) |`khs1994/php:8.2.3-composer-alpine`| **2.5.5** |`alpine:3.16` | |[Memcached](https://github.com/docker-library/docs/tree/master/memcached) |`memcached:1.6.15-alpine` | **1.6.15** |`alpine:3.16` | |[RabbitMQ](https://github.com/docker-library/docs/tree/master/rabbitmq) |`rabbitmq:3.9.0-management-alpine` | **3.9.0** |`alpine:3.13` | |[PostgreSQL](https://github.com/docker-library/docs/tree/master/postgres) |`postgres:14.0-alpine` | **14.0** |`alpine:3.14` | diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index e0b87d0b3..000000000 --- a/RELEASE.md +++ /dev/null @@ -1,22 +0,0 @@ -# 版本发布流程 - -## 修改以下文件中的版本号 - -* CHANGELOG.md -* lnmp-docker.ps1 - -**主、次版本号** - -* cli/.env -* cli/.env.ps1 -* 全部搜索替换 - -## 发布 `lnmp-docker.ps1` - -```powershell -$ Publish-Script -Path ${PWD}/lnmp-docker.ps1 -NuGetApiKey $env:NUGET_API_KEY -Force -``` - -## 同步镜像到国内 [`ccr.ccs.tencentyun.com/library-mirror`](https://cloud.tencent.com/act/cps/redirect?redirect=10058&cps_key=3a5255852d5db99dcd5da4c72f05df61) - -使用 `dockerfile/sync` 在 Coding.net CI 同步镜像到国内 [`ccr.ccs.tencentyun.com/library-mirror/SOFT(e.g. redis)`](https://cloud.tencent.com/act/cps/redirect?redirect=10058&cps_key=3a5255852d5db99dcd5da4c72f05df61) diff --git a/TODO.md b/TODO.md index 6baf0d65e..0f86ed164 100644 --- a/TODO.md +++ b/TODO.md @@ -1,4 +1,4 @@ # TODO * `lnmp-docker` 代码控制在 `1700` 行以内 -* `lnmp-docker.ps1` 代码控制在 `1400` 行以内 +* `lnmp-docker.ps1` 代码控制在 `1300` 行以内 diff --git a/app/demo/.drone.yml b/app/demo/.drone.yml index f3629a9d9..2208f8266 100644 --- a/app/demo/.drone.yml +++ b/app/demo/.drone.yml @@ -33,8 +33,8 @@ clone: steps: # install dep - name: install - # image: composer:2.5.1 - image: khs1994/php:8.1.9-composer-alpine + # image: composer:2.5.5 + image: khs1994/php:8.2.3-composer-alpine commands: - pwd - composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ @@ -46,7 +46,7 @@ steps: # test script - name: script - image: khs1994/php:8.1.9-fpm-alpine + image: khs1994/php:8.2.3-fpm-alpine # pull: always | never | if-not-exists # detach: true # privileged: true @@ -92,7 +92,7 @@ steps: settings: # registry: docker.khs1994.com repo: khs1994/php - tags: 8.1.9-pro-${DRONE_TAG}-alpine + tags: 8.2.3-pro-${DRONE_TAG}-alpine target: php mirror: https://hub-mirror.c.163.com # build_args: @@ -142,7 +142,7 @@ steps: image: plugins/docker settings: repo: khs1994/php - tags: 8.1.9-pro-${DRONE_TAG}-alpine + tags: 8.2.3-pro-${DRONE_TAG}-alpine target: php mirror: https://hub-mirror.c.163.com username: @@ -179,7 +179,7 @@ steps: event: [ tag ] - name: after_success - image: khs1994/php:8.1.9-composer-alpine + image: khs1994/php:8.2.3-composer-alpine when: status: success commands: @@ -226,11 +226,12 @@ volumes: # matrix: # COMPOSER_VERSION: -# - 2.5.1 +# - 2.5.5 # PHP_VERSION: -# - 8.1.9 -# - 8.0.23 -# - 7.4.32 +# - 8.2.3 +# - 8.1.12 +# - 8.0.26 +# # - 7.4.33 # # - 7.3.33 # # - 7.2.34 # # - 7.1.33 @@ -241,7 +242,7 @@ volumes: # REDIS_VERSION: # - 7.0.0 # MYSQL_VERSION: -# # - 8.0.30 +# # - 8.0.33 # - 5.7.22 # MONGODB_VERSION: # - 4.1.0 diff --git a/app/demo/.env.example b/app/demo/.env.example index 058bfdaad..114acf55d 100644 --- a/app/demo/.env.example +++ b/app/demo/.env.example @@ -1,8 +1,9 @@ DOCKER_HUB_USERNAME=khs1994 -PHP_VERSION=8.1.9 -# PHP_VERSION=8.0.23 -# PHP_VERSION=7.4.32 +PHP_VERSION=8.2.3 +# PHP_VERSION=8.1.12 +# PHP_VERSION=8.0.26 +# PHP_VERSION=7.4.33 # PHP_VERSION=7.3.33 # PHP_VERSION=7.2.34 # PHP_VERSION=7.1.33 diff --git a/app/demo/.github/workflows/ci.yml b/app/demo/.github/workflows/ci.yml index a4a2403fb..fbd652681 100644 --- a/app/demo/.github/workflows/ci.yml +++ b/app/demo/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: test: strategy: matrix: - php_version: ["7.4.32","8.0.23","8.1.9"] + php_version: ["8.0.26","8.1.12","8.2.3"] runs-on: ubuntu-latest # needs: job steps: diff --git a/app/demo/.pcit.yml b/app/demo/.pcit.yml index 4ae350d3f..6478f1b7a 100644 --- a/app/demo/.pcit.yml +++ b/app/demo/.pcit.yml @@ -16,7 +16,7 @@ steps: # install dep install: # image: composer:${COMPOSER_VERSION} - image: khs1994/php:8.1.9-composer-alpine + image: khs1994/php:8.2.3-composer-alpine shell: bash run: - pwd @@ -80,7 +80,7 @@ steps: event: tag after_success: - image: khs1994/php:8.1.9-composer-alpine + image: khs1994/php:8.2.3-composer-alpine shell: bash if: status: success @@ -127,11 +127,12 @@ services: jobs: COMPOSER_VERSION: - - 2.5.1 + - 2.5.5 PHP_VERSION: - - 8.1.9 - - 8.0.23 - - 7.4.32 + - 8.2.3 + - 8.1.12 + - 8.0.26 + # - 7.4.33 # - 7.3.33 # - 7.2.34 # - 7.1.33 diff --git a/app/demo/Dockerfile b/app/demo/Dockerfile index 432880cae..444c6cd4d 100644 --- a/app/demo/Dockerfile +++ b/app/demo/Dockerfile @@ -9,7 +9,7 @@ # !! 搜索 /app/EXAMPLE 替换为自己的项目目录 !! ARG NODE_VERSION=18.2.0 -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.2.3 ARG NGINX_VERSION=1.15.0 ARG DOCKER_HUB_USERNAME=khs1994 @@ -28,7 +28,7 @@ RUN cd /app \ --no-plugins # 2.将项目打入 PHP 镜像 -# $ docker build -t khs1994/php:8.1.9-pro-GIT_TAG-alpine --target=php . +# $ docker build -t khs1994/php:8.2.3-pro-GIT_TAG-alpine --target=php . FROM ${DOCKER_HUB_USERNAME:-khs1994}/php:${PHP_VERSION}-fpm-alpine as php diff --git a/app/demo/deploy/docker-stack.yml b/app/demo/deploy/docker-stack.yml index 8288bbb48..693b5f165 100644 --- a/app/demo/deploy/docker-stack.yml +++ b/app/demo/deploy/docker-stack.yml @@ -42,7 +42,7 @@ services: target: /etc/nginx/conf.d/ssl/khs1994.com.key php7: - image: khs1994/php:7.4.32-pro-alpine + image: khs1994/php:7.4.33-pro-alpine environment: - TZ=Asia/Shanghai networks: diff --git a/app/demo/deploy/test.Dockerfile b/app/demo/deploy/test.Dockerfile index 32ebe7a1f..bf27de5e1 100644 --- a/app/demo/deploy/test.Dockerfile +++ b/app/demo/deploy/test.Dockerfile @@ -2,7 +2,7 @@ # TEST PHP PROJECT BY Docker # -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.2.3 ARG GIT_REPO={{ EXAMPLE_GIT_URL_EXAMPLE }}/{{ EXAMPLE_GIT_USERNAME_EXAMPLE }}/{{ EXAMPLE_GIT_REPO_EXAMPLE }}.git FROM khs1994/php:${PHP_VERSION}-composer-alpine diff --git a/app/demo/docker-compose.yml b/app/demo/docker-compose.yml index 6631fed44..d4e63b2f7 100644 --- a/app/demo/docker-compose.yml +++ b/app/demo/docker-compose.yml @@ -19,7 +19,7 @@ services: context: . dockerfile: deploy/test.Dockerfile args: - - PHP_VERSION=${PHP_VERSION:-8.1.9} + - PHP_VERSION=${PHP_VERSION:-8.2.3} image: ${DOCKER_HUB_USERNAME:-khs1994}/EXAMPLE nginx: @@ -39,7 +39,7 @@ services: dockerfile: Dockerfile target: php args: - - PHP_VERSION=${PHP_VERSION:-8.1.9} + - PHP_VERSION=${PHP_VERSION:-8.2.3} - NODE_VERSION=${NODE_VERSION:-18.2.0} - NODE_REGISTRY=https://registry.npmmirror.com - image: ${DOCKER_HUB_USERNAME:-khs1994}/php:${PHP_VERSION:-8.1.9}-pro-alpine + image: ${DOCKER_HUB_USERNAME:-khs1994}/php:${PHP_VERSION:-8.2.3}-pro-alpine diff --git a/app/demo/docker-workspace.yml b/app/demo/docker-workspace.yml index b4289f4ed..4e7671490 100644 --- a/app/demo/docker-workspace.yml +++ b/app/demo/docker-workspace.yml @@ -9,7 +9,7 @@ x-common: services: workspace: &workspace - image: khs1994/php:8.1.9-composer-alpine + image: khs1994/php:8.2.3-composer-alpine networks: - backend volumes: @@ -64,14 +64,16 @@ services: - 9003:9003 composer: - << : *workspace - << : *common - image: "khs1994/php:8.1.9-composer-alpine" + << : + - *workspace + - *common + image: "khs1994/php:8.2.3-composer-alpine" command: [] # install | update npm: - << : *workspace - << : *common + << : + - *workspace + - *common image: node:18.2.0-alpine entrypoint: npm command: [] # install | "run","dev" | diff --git a/app/laravel-demo/.github/workflows/ci-cdn.yaml b/app/laravel-demo/.github/workflows/ci-cdn.yaml index ad3cc478e..bef98ee2f 100644 --- a/app/laravel-demo/.github/workflows/ci-cdn.yaml +++ b/app/laravel-demo/.github/workflows/ci-cdn.yaml @@ -79,12 +79,8 @@ jobs: cd laravel - patch -p1 < ../laravel-demo/.patch/cdn/config-app.patch - patch -p1 < ../laravel-demo/.patch/app-console-kernel.patch - lnmp-composer require laravel/jetstream lnmp-composer require league/flysystem-aws-s3-v3 "^3.0" - # 此步骤会重置 webpack.mix.js # lnmp-php artisan jetstream:install livewire lnmp-php artisan jetstream:install inertia # lnmp-php artisan jetstream:install --teams @@ -95,8 +91,7 @@ jobs: ls -la resources/views lnmp-npm i - lnmp-npm install laravel-mix-make-file-hash --save-dev - lnmp-npm run dev + lnmp-npm run build ls public/js ls public/css @@ -121,7 +116,7 @@ jobs: \ --build-arg NODE_REGISTRY=https://registry.npmjs.org \ --target=laravel \ - -t khs1994/laravel:9 \ + -t khs1994/laravel:10 \ -f Dockerfile.cdn . \ docker buildx build --load \ @@ -129,7 +124,7 @@ jobs: \ --build-arg NODE_REGISTRY=https://registry.npmjs.org \ --target=laravel-rootless \ - -t khs1994/laravel:9-rootless \ + -t khs1994/laravel:10-rootless \ -f Dockerfile.cdn . \ - name: Up LNMP run: | @@ -170,7 +165,7 @@ jobs: curl -k https://laravel-docker.t.khs1994.com/test/schedule/result echo ::endgroup:: - docker run -i --rm --entrypoint=sh khs1994/laravel:9 -c "ls -la /app/laravel-docker" + docker run -i --rm --entrypoint=sh khs1994/laravel:10 -c "ls -la /app/laravel-docker" - name: Connect and Test Rootless run: | @@ -208,6 +203,6 @@ jobs: curl -k https://laravel-docker.t.khs1994.com/test/rootless/result echo ::endgroup:: - docker run -i --rm --entrypoint=sh khs1994/laravel:9-rootless -c "ls -la /app/laravel-docker" + docker run -i --rm --entrypoint=sh khs1994/laravel:10-rootless -c "ls -la /app/laravel-docker" # - name: Setup tmate session # uses: mxschmitt/action-tmate@v3 diff --git a/app/laravel-demo/.github/workflows/ci.yaml b/app/laravel-demo/.github/workflows/ci.yaml index b863d694e..a4913d67d 100644 --- a/app/laravel-demo/.github/workflows/ci.yaml +++ b/app/laravel-demo/.github/workflows/ci.yaml @@ -57,10 +57,7 @@ jobs: cd laravel - patch -p1 < ../laravel-demo/.patch/app-console-kernel.patch - lnmp-composer require laravel/jetstream - # 此步骤会重置 webpack.mix.js lnmp-php artisan jetstream:install inertia # sudo chown `id -u`:`id -g` -R resources public @@ -69,8 +66,8 @@ jobs: ls -la resources/views lnmp-npm install - lnmp-npm install laravel-mix-make-file-hash --save - lnmp-npm run dev + + lnmp-npm run build ls public/js ls public/css @@ -88,18 +85,18 @@ jobs: docker buildx build --load \ --build-arg NODE_REGISTRY=https://registry.npmjs.org \ --target=laravel \ - -t khs1994/laravel:9 \ + -t khs1994/laravel:10 \ -f Dockerfile.buildkit . docker buildx build --load \ --build-arg NODE_REGISTRY=https://registry.npmjs.org \ --target=laravel-rootless \ - -t khs1994/laravel:9-rootless \ + -t khs1994/laravel:10-rootless \ -f Dockerfile.buildkit . if [ $EVENT_NAME = 'push' ];then - docker push khs1994/laravel:9 - docker push khs1994/laravel:9-rootless + docker push khs1994/laravel:10 + docker push khs1994/laravel:10-rootless fi - name: Up LNMP run: | @@ -134,7 +131,7 @@ jobs: curl -k https://laravel-docker.t.khs1994.com/test/schedule/result echo ::endgroup:: - docker run -i --rm --entrypoint=sh khs1994/laravel:9 -c "ls -la /app/laravel-docker" + docker run -i --rm --entrypoint=sh khs1994/laravel:10 -c "ls -la /app/laravel-docker" - name: Connect and Test Rootless run: | echo 'LNMP_LARAVEL_TAG=9-rootless' >> $LNMP_PATH/.env @@ -171,6 +168,6 @@ jobs: curl -k https://laravel-docker.t.khs1994.com/test/rootless/result echo ::endgroup:: - docker run -i --rm --entrypoint=sh khs1994/laravel:9-rootless -c "ls -la /app/laravel-docker" + docker run -i --rm --entrypoint=sh khs1994/laravel:10-rootless -c "ls -la /app/laravel-docker" # - name: Setup tmate session # uses: mxschmitt/action-tmate@v3 diff --git a/app/laravel-demo/.patch/app-console-kernel.patch b/app/laravel-demo/.patch/app-console-kernel.patch deleted file mode 100644 index 3f44e9ead..000000000 --- a/app/laravel-demo/.patch/app-console-kernel.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/app/Console/Kernel.php -+++ b/app/Console/Kernel.php -@@ -16,6 +16,10 @@ - protected function schedule(Schedule $schedule) - { - // $schedule->command('inspire')->hourly(); -+ -+ $schedule->command('env') -+ ->everyMinute() -+ ->appendOutputTo(storage_path('app/schedule.txt')); - } - - /** diff --git a/app/laravel-demo/.patch/cdn/config-app.patch b/app/laravel-demo/.patch/cdn/config-app.patch deleted file mode 100644 index 15aa94bc9..000000000 --- a/app/laravel-demo/.patch/cdn/config-app.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/config/app.php -+++ b/config/app.php -@@ -58,6 +58,8 @@ return [ - - 'asset_url' => env('ASSET_URL', null), - -+ 'mix_url' => env('ASSET_URL', null), -+ - /* - |-------------------------------------------------------------------------- - | Application Timezone diff --git a/app/laravel-demo/Dockerfile b/app/laravel-demo/Dockerfile index 562fe4bc3..f18c6f023 100644 --- a/app/laravel-demo/Dockerfile +++ b/app/laravel-demo/Dockerfile @@ -11,39 +11,15 @@ # !! 搜索 /app/laravel-docker 替换为自己的项目目录 !! # 此 Dockerfile 专为 CI 环境设计(国外),请通过 --build-arg ARG=value 设置国内镜像 # -# $ docker build --target=laravel -t khs1994/laravel:7 --build-arg NODE_REGISTRY=https://registry.npmmirror.com --build-arg CI=false . +# $ docker build --target=laravel -t khs1994/laravel:10 --build-arg NODE_REGISTRY=https://registry.npmmirror.com --build-arg CI=false . ARG NODE_VERSION=18.2.0 -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.2.3 ARG NGINX_VERSION=1.23.3-alpine ARG DOCKER_HUB_USERNAME=khs1994 -# 1.前端构建 -FROM node:${NODE_VERSION:-18.2.0}-alpine as frontend - -ARG NODE_REGISTRY=https://registry.npmjs.org - -# COPY package.json webpack.mix.js yarn.lock /app/ -# COPY package.json webpack.mix.js package-lock.json /app/ -COPY package.json /app/ - -RUN set -x ; cd /app \ - # && yarn install \ - && npm install --registry=${NODE_REGISTRY} - -COPY resources/ /app/resources/ - -COPY webpack.mix.js tailwind.config.js /app/ - -RUN set -x ; cd /app \ -# File.exists('./artisan'); 如果 artisan 文件存在,则说明是 laravel 项目 - && touch artisan \ - && mkdir -p public \ - # && yarn production \ - && npm run production - # 2.安装 composer 依赖 -FROM ${DOCKER_HUB_USERNAME}/php:8.1.9-composer-alpine as composer +FROM ${DOCKER_HUB_USERNAME}/php:8.2.3-composer-alpine as composer # COPY composer.json composer.lock /app/ COPY composer.json /app/ @@ -52,7 +28,8 @@ COPY database/ /app/database/ ARG CI=true RUN set -x ; cd /app \ - && composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ \ +# && composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ \ + && composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/ \ && if [ $CI = 'true' ];then composer config -g --unset repos.packagist; fi \ && composer install --no-dev \ --ignore-platform-reqs \ @@ -62,17 +39,40 @@ RUN set -x ; cd /app \ --no-plugins \ --optimize-autoloader +# 1.前端构建 +FROM node:${NODE_VERSION:-18.2.0}-alpine as frontend + +ARG NODE_REGISTRY=https://registry.npmjs.org + +# COPY package.json vite.config.js yarn.lock /app/ +# COPY package.json vite.config.js package-lock.json /app/ +COPY package.json /app/ + +RUN set -x ; cd /app \ + # && yarn install \ + && npm install --registry=${NODE_REGISTRY} + +COPY resources/ /app/resources/ + +COPY vite.config.js tailwind.config.js postcss.config.js /app/ + +COPY --from=composer /app/vendor/ /app/laravel-docker/vendor/ + +RUN set -x ; cd /app \ + && mkdir -p public \ + # && yarn production \ + && npm run build + # 3.将项目打入 PHP 镜像 # $ docker build -t khs1994/laravel:TAG --target=laravel . FROM ${DOCKER_HUB_USERNAME}/php:${PHP_VERSION}-s6-alpine as laravel COPY . /app/laravel-docker/ COPY --from=composer /app/vendor/ /app/laravel-docker/vendor/ -COPY --from=frontend /app/public/js/ /app/laravel-docker/public/js/ -COPY --from=frontend /app/public/css/ /app/laravel-docker/public/css/ -COPY --from=frontend /app/public/mix-manifest.json /app/laravel-docker/public/mix-manifest.json +COPY --from=frontend /app/public/build/ /app/laravel-docker/public/build/ VOLUME /app/laravel-docker/storage/framework/views +VOLUME /app/laravel-docker/bootstrap/cache ENTRYPOINT [ "sh", "/app/laravel-docker/.docker/docker-entrypoint.sh" ] diff --git a/app/laravel-demo/Dockerfile.buildkit b/app/laravel-demo/Dockerfile.buildkit index 4cc945c3d..d3c44e52d 100644 --- a/app/laravel-demo/Dockerfile.buildkit +++ b/app/laravel-demo/Dockerfile.buildkit @@ -13,20 +13,43 @@ # !! 搜索 /app/laravel-docker 替换为自己的项目目录 !! # 此 Dockerfile 专为 CI 环境设计(国外),请通过 --build-arg ARG=value 设置国内镜像 # -# $ docker buildx build --target=laravel --load -t khs1994/laravel:7 -f Dockerfile.buildkit --build-arg NODE_REGISTRY=https://registry.npmmirror.com --build-arg CI=false . +# $ docker buildx build --target=laravel --load -t khs1994/laravel:10 -f Dockerfile.buildkit --build-arg NODE_REGISTRY=https://registry.npmmirror.com --build-arg CI=false . ARG NODE_VERSION=18.2.0 -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.2.3 ARG NGINX_VERSION=1.23.3-alpine ARG DOCKER_HUB_USERNAME=khs1994 +# 2.安装 composer 依赖 +FROM ${DOCKER_HUB_USERNAME}/php:8.2.3-composer-alpine as composer + +# COPY composer.json composer.lock /app/ +COPY --link composer.json /app/ +COPY --link database/ /app/database/ + +ARG CI=true + +RUN --mount=type=cache,target=/tmp,id=laravel_caches \ + set -x ; \ + cd /app \ +# && composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ \ + && composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/ \ + && if [ $CI = 'true' ];then composer config -g --unset repos.packagist; fi \ + && composer install --no-dev \ + --ignore-platform-reqs \ + --prefer-dist \ + --no-interaction \ + --no-scripts \ + --no-plugins \ + --optimize-autoloader + # 1.前端构建 FROM node:${NODE_VERSION:-18.2.0}-alpine as frontend ARG NODE_REGISTRY=https://registry.npmjs.org -# COPY package.json webpack.mix.js yarn.lock /app/ -# COPY package.json webpack.mix.js package-lock.json /app/ +# COPY package.json vite.config.js yarn.lock /app/ +# COPY package.json vite.config.js package-lock.json /app/ COPY --link package.json /app/ RUN --mount=type=cache,target=/app/node_modules,id=laravel-docker_node_modules \ @@ -38,38 +61,15 @@ RUN --mount=type=cache,target=/app/node_modules,id=laravel-docker_node_modules \ COPY --link resources/ /app/resources/ -COPY --link webpack.mix.js tailwind.config.js /app/ +COPY --link vite.config.js tailwind.config.js postcss.config.js /app/ RUN --mount=type=cache,target=/app/node_modules,id=laravel-docker_node_modules \ + --mount=type=bind,from=composer,source=/app/vendor,target=/app/vendor \ set -x ; \ cd /app \ -# File.exists('./artisan'); 如果 artisan 文件存在,则说明是 laravel 项目 - && touch artisan \ && mkdir -p public \ # && yarn production \ - && npm run production - -# 2.安装 composer 依赖 -FROM ${DOCKER_HUB_USERNAME}/php:8.1.9-composer-alpine as composer - -# COPY composer.json composer.lock /app/ -COPY --link composer.json /app/ -COPY --link database/ /app/database/ - -ARG CI=true - -RUN --mount=type=cache,target=/tmp,id=laravel_caches \ - set -x ; \ - cd /app \ - && composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ \ - && if [ $CI = 'true' ];then composer config -g --unset repos.packagist; fi \ - && composer install --no-dev \ - --ignore-platform-reqs \ - --prefer-dist \ - --no-interaction \ - --no-scripts \ - --no-plugins \ - --optimize-autoloader + && npm run build # 3.将项目打入 PHP 镜像 # $ docker build -t khs1994/laravel:TAG --target=laravel . @@ -77,11 +77,10 @@ FROM ${DOCKER_HUB_USERNAME}/php:${PHP_VERSION}-s6-alpine as laravel COPY --link . /app/laravel-docker/ COPY --from=composer --link /app/vendor/ /app/laravel-docker/vendor/ -COPY --from=frontend --link /app/public/js/ /app/laravel-docker/public/js/ -COPY --from=frontend --link /app/public/css/ /app/laravel-docker/public/css/ -COPY --from=frontend --link /app/public/mix-manifest.json /app/laravel-docker/public/mix-manifest.json +COPY --from=frontend --link /app/public/build/ /app/laravel-docker/public/build/ VOLUME /app/laravel-docker/storage/framework/views +VOLUME /app/laravel-docker/bootstrap/cache ENTRYPOINT [ "sh", "/app/laravel-docker/.docker/docker-entrypoint.sh" ] diff --git a/app/laravel-demo/Dockerfile.cdn b/app/laravel-demo/Dockerfile.cdn index db952ff5c..c2d4ae205 100644 --- a/app/laravel-demo/Dockerfile.cdn +++ b/app/laravel-demo/Dockerfile.cdn @@ -13,19 +13,41 @@ # !! 搜索 /app/laravel-docker 替换为自己的项目目录 !! # 此 Dockerfile 专为 CI 环境设计(国外),请通过 --build-arg ARG=value 设置国内镜像 # -# $ docker buildx build --target=laravel --load -t khs1994/laravel:7 -f Dockerfile.cdn --build-arg NODE_REGISTRY=https://registry.npmmirror.com --build-arg CI=false . +# $ docker buildx build --target=laravel --load -t khs1994/laravel:10 -f Dockerfile.cdn --build-arg NODE_REGISTRY=https://registry.npmmirror.com --build-arg CI=false . -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.2.3 ARG NGINX_VERSION=1.23.3-alpine ARG DOCKER_HUB_USERNAME=khs1994 +# 2.安装 composer 依赖 +FROM ${DOCKER_HUB_USERNAME}/php:8.2.3-composer-alpine as composer + +# COPY composer.json composer.lock /app/ +COPY composer.json /app/ +COPY database/ /app/database/ + +ARG CI=true + +RUN --mount=type=cache,target=/tmp,id=laravel_caches \ + set -x && cd /app \ +# && composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ \ + && composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/ \ + && if [ $CI = 'true' ];then composer config -g --unset repos.packagist; fi \ + && composer install --no-dev \ + --ignore-platform-reqs \ + --prefer-dist \ + --no-interaction \ + --no-scripts \ + --no-plugins \ + --optimize-autoloader + # 1.前端构建,并上传到 CDN FROM node:${NODE_VERSION:-18.2.0}-alpine as frontend ARG NODE_REGISTRY=https://registry.npmjs.org -# COPY package.json webpack.mix.js yarn.lock /app/ -# COPY package.json webpack.mix.js package-lock.json /app/ +# COPY package.json vite.config.js yarn.lock /app/ +# COPY package.json vite.config.js package-lock.json /app/ COPY package.json /app/ RUN --mount=type=cache,target=/app/node_modules,id=laravel-docker_node_modules \ @@ -36,21 +58,18 @@ RUN --mount=type=cache,target=/app/node_modules,id=laravel-docker_node_modules \ COPY resources/ /app/resources/ -COPY webpack.mix.js tailwind.config.js /app/ +COPY vite.config.js tailwind.config.js postcss.config.js /app/ RUN --mount=type=cache,target=/app/node_modules,id=laravel-docker_node_modules \ + --mount=type=bind,from=composer,source=/app/vendor,target=/app/vendor \ set -x ; cd /app \ -# File.exists('./artisan'); 如果 artisan 文件存在,则说明是 laravel 项目 - && touch artisan \ && mkdir -p public \ # && yarn production \ - && npm run production + && npm run build FROM minio/mc as frontend-assets-uploader -COPY --from=frontend /app/public/js/ /app/laravel-docker/public/js/ -COPY --from=frontend /app/public/css/ /app/laravel-docker/public/css/ -COPY --from=frontend /app/public/mix-manifest.json /app/laravel-docker/public/mix-manifest.json +COPY --from=frontend /app/public/build/ /app/laravel-docker/public/build/ # 上传密钥等变量设置 # 这里为了方便直接给出默认值,实际使用时请通过 --build-arg 传递 @@ -67,34 +86,11 @@ RUN set -x \ && mc --insecure config host add minio ${CDN_HOST} $ACCESS_KEY_ID $SECRET_ACCESS_KEY \ && mc config host list minio \ && mc --insecure mb --ignore-existing minio/${CDN_BUCKET} \ - && mc --insecure mirror --overwrite /app/laravel-docker/public/js \ - minio/${CDN_BUCKET}/frontend-assets/js/ \ - && mc --insecure mirror --overwrite /app/laravel-docker/public/css \ - minio/${CDN_BUCKET}/frontend-assets/css/ \ + && mc --insecure mirror --overwrite /app/laravel-docker/public/build \ + minio/${CDN_BUCKET}/frontend-assets/build/ \ # && mc --insecure ls -r minio/${CDN_BUCKET}/frontend-assets \ && mc --insecure policy set public minio/${CDN_BUCKET} -# 2.安装 composer 依赖 -FROM ${DOCKER_HUB_USERNAME}/php:8.1.9-composer-alpine as composer - -# COPY composer.json composer.lock /app/ -COPY composer.json /app/ -COPY database/ /app/database/ - -ARG CI=true - -RUN --mount=type=cache,target=/tmp,id=laravel_caches \ - set -x && cd /app \ - && composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ \ - && if [ $CI = 'true' ];then composer config -g --unset repos.packagist; fi \ - && composer install --no-dev \ - --ignore-platform-reqs \ - --prefer-dist \ - --no-interaction \ - --no-scripts \ - --no-plugins \ - --optimize-autoloader - # 3.将项目打入 PHP 镜像 # $ docker build -t khs1994/laravel:TAG --target=laravel . FROM ${DOCKER_HUB_USERNAME}/php:${PHP_VERSION}-s6-alpine as laravel @@ -102,9 +98,10 @@ FROM ${DOCKER_HUB_USERNAME}/php:${PHP_VERSION}-s6-alpine as laravel COPY . /app/laravel-docker/ COPY --from=composer /app/vendor/ /app/laravel-docker/vendor/ # 不从 frontend 复制是为了触发 frontend-assets-uploader -COPY --from=frontend-assets-uploader /app/laravel-docker/public/mix-manifest.json /app/laravel-docker/public/mix-manifest.json +COPY --from=frontend-assets-uploader /app/laravel-docker/public/build/manifest.json /app/laravel-docker/public/build/manifest.json VOLUME /app/laravel-docker/storage/framework/views +VOLUME /app/laravel-docker/bootstrap/cache ENTRYPOINT [ "sh", "/app/laravel-docker/.docker/docker-entrypoint.sh" ] diff --git a/app/laravel-demo/README.md b/app/laravel-demo/README.md index 25ab77751..4bb165d7a 100644 --- a/app/laravel-demo/README.md +++ b/app/laravel-demo/README.md @@ -9,7 +9,3 @@ * 不要在 config 以外的地方调用 `env()` 函数,运行 `config:cache` 以后该函数永远返回 `null` ## TODO - -## ui auth + mix version - -`resources/views/layouts/app.blade.php` `asset()` 函数替换为 `mix()` diff --git a/app/laravel-demo/patch/.docker/docker-entrypoint.sh b/app/laravel-demo/patch/.docker/docker-entrypoint.sh index 3b95525f6..9b9a31e8c 100644 --- a/app/laravel-demo/patch/.docker/docker-entrypoint.sh +++ b/app/laravel-demo/patch/.docker/docker-entrypoint.sh @@ -20,9 +20,8 @@ cd /app cp -a ${APP_PATH}/public/. ${APP_PATH}-public-volume # chown -chown $APP_OWN ${APP_PATH}/storage/framework/views - -chown $APP_OWN ${APP_PATH}/bootstrap/cache +chown -R $APP_OWN ${APP_PATH}/storage +chown -R $APP_OWN ${APP_PATH}/bootstrap/cache # s6 cp -a $APP_PATH/.docker/s6/. /etc/services.d diff --git a/app/laravel-demo/patch/.dockerignore b/app/laravel-demo/patch/.dockerignore index 92d96c463..38ae48e7d 100644 --- a/app/laravel-demo/patch/.dockerignore +++ b/app/laravel-demo/patch/.dockerignore @@ -7,9 +7,7 @@ vendor node_modules/ -public/js/ -public/css/ -public/mix-manifest.json +public/build/ yarn-error.log diff --git a/app/laravel-demo/patch/app/Console/Kernel.php b/app/laravel-demo/patch/app/Console/Kernel.php new file mode 100644 index 000000000..55aa95d57 --- /dev/null +++ b/app/laravel-demo/patch/app/Console/Kernel.php @@ -0,0 +1,31 @@ +command('inspire')->hourly(); + + $schedule->command('env') + ->everyMinute() + ->appendOutputTo(storage_path('app/schedule.txt')); + } + + /** + * Register the commands for the application. + */ + protected function commands(): void + { + $this->load(__DIR__.'/Commands'); + + require base_path('routes/console.php'); + } +} diff --git a/app/laravel-demo/patch/resources/js/a.js b/app/laravel-demo/patch/resources/js/a.js index 75020a488..6774a91f1 100644 --- a/app/laravel-demo/patch/resources/js/a.js +++ b/app/laravel-demo/patch/resources/js/a.js @@ -1,4 +1,4 @@ import { createApp, h } from 'vue'; -import ExampleComponent from './components/ExampleComponent.vue' +import ExampleComponent from './Components/ExampleComponent.vue' createApp(ExampleComponent).mount('#app'); diff --git a/app/laravel-demo/patch/resources/views/test.blade.php b/app/laravel-demo/patch/resources/views/test.blade.php index 0d5cd60a4..4c5f9f2c7 100644 --- a/app/laravel-demo/patch/resources/views/test.blade.php +++ b/app/laravel-demo/patch/resources/views/test.blade.php @@ -3,12 +3,9 @@ Example - -
- -
+
- +@vite(['resources/js/a.js']) diff --git a/app/laravel-demo/patch/vite.config.js b/app/laravel-demo/patch/vite.config.js new file mode 100644 index 000000000..be8430478 --- /dev/null +++ b/app/laravel-demo/patch/vite.config.js @@ -0,0 +1,20 @@ +import { defineConfig } from 'vite'; +import laravel from 'laravel-vite-plugin'; +import vue from '@vitejs/plugin-vue'; + +export default defineConfig({ + plugins: [ + laravel({ + input: ['resources/js/app.js','resources/js/a.js'], + refresh: true, + }), + vue({ + template: { + transformAssetUrls: { + base: null, + includeAbsolute: false, + }, + }, + }), + ], +}); diff --git a/app/laravel-demo/patch/webpack.mix.js b/app/laravel-demo/patch/webpack.mix.js deleted file mode 100644 index 4ee8f6b46..000000000 --- a/app/laravel-demo/patch/webpack.mix.js +++ /dev/null @@ -1,35 +0,0 @@ -const mix = require('laravel-mix'); - -/* - |-------------------------------------------------------------------------- - | Mix Asset Management - |-------------------------------------------------------------------------- - | - | Mix provides a clean, fluent API for defining some Webpack build steps - | for your Laravel application. By default, we are compiling the Sass - | file for the application as well as bundling up all the JS files. - | - */ - -mix.js('resources/js/app.js', 'public/js').vue() - .js('resources/js/a.js', 'public/js').vue() - .postCss('resources/css/app.css', 'public/css', [ - require('tailwindcss'), - ]) - .alias({ - '@': 'resources/js', - }); - -// if (mix.inProduction()) { -// mix.version(); -// } - -mix.version(); - -mix.then(() => { - const convertToFileHash = require("laravel-mix-make-file-hash"); - convertToFileHash({ - publicPath: "public", - manifestFilePath: "public/mix-manifest.json" - }); -}); diff --git a/bin/lnmp-laravel b/bin/lnmp-laravel index d68dc6818..9def19d0e 100755 --- a/bin/lnmp-laravel +++ b/bin/lnmp-laravel @@ -53,7 +53,7 @@ docker run -i ${tty} --rm \ --mount type=bind,src=$ScriptRoot/../config/php8/php-cli.ini,target=/usr/local/etc/php/php-cli.ini \ --env-file $ScriptRoot/../config/composer/.env \ ${LNMP_PHP_IMAGE}:${LNMP_PHP_IMAGE_TAG} \ - gosu ${LNMP_USER:-root:root} composer create-project --prefer-dist laravel/laravel=${3:-9.*} "$2" + gosu ${LNMP_USER:-root:root} composer create-project --prefer-dist laravel/laravel=${3:-10.*} "$2" else echo "Path $2 existing" diff --git a/bin/lnmp-laravel.ps1 b/bin/lnmp-laravel.ps1 index 0fccd7c63..d0bf3623d 100644 --- a/bin/lnmp-laravel.ps1 +++ b/bin/lnmp-laravel.ps1 @@ -25,7 +25,7 @@ lnmp-laravel new [My-project] [VERSION:-9]" $LARAVEL_PATH=$args[1] if (!$args[2]){ - $VERSION=9 + $VERSION=10 }else{ $VERSION=$args[2] } diff --git a/bin/lnmp-mysql b/bin/lnmp-mysql index e317e8f78..bd5bcf0e5 100755 --- a/bin/lnmp-mysql +++ b/bin/lnmp-mysql @@ -17,7 +17,7 @@ source $ScriptRoot/.init if [ "$debug" = 'true' ];then set -x; fi -image=mysql:${LNMP_MYSQL_VERSION:-8.0.30} +image=mysql:${LNMP_MYSQL_VERSION:-8.0.33} if ! [ $(uname -s) = 'x86_64' ];then image=mariadb:${LNMP_MARIADB_VERSION:-10.8.3} diff --git a/bin/lnmp-mysql.ps1 b/bin/lnmp-mysql.ps1 index 8317b5556..4f4c84cbb 100644 --- a/bin/lnmp-mysql.ps1 +++ b/bin/lnmp-mysql.ps1 @@ -13,5 +13,5 @@ docker run -it --rm ` --network $NETWORK ` -e TZ=${TZ} ` --entrypoint mysql ` - mysql:8.0.30 ` + mysql:8.0.33 ` $args diff --git a/cli/.env.ps1 b/cli/.env.ps1 deleted file mode 100644 index c3bb43ec9..000000000 --- a/cli/.env.ps1 +++ /dev/null @@ -1 +0,0 @@ -$LNMP_DOCKER_VERSION="v20.10" diff --git a/cli/rpm/README.md b/cli/rpm/README.md deleted file mode 100644 index 545683870..000000000 --- a/cli/rpm/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# 制作 RPM 包 - -```bash -$ rpmbuild -bb cli/rpm/SPECS/khs1994-docker-lnmp.spec -``` diff --git a/cluster/docker-cluster.memcached.yml b/cluster/docker-cluster.memcached.yml index f2eb06573..275bb9259 100644 --- a/cluster/docker-cluster.memcached.yml +++ b/cluster/docker-cluster.memcached.yml @@ -16,7 +16,7 @@ x-common: networks: - cluster_memcached env_file: - - ./cli/timezone.env + - ./scripts/cli/timezone.env x-deploy: &default-deploy @@ -41,13 +41,15 @@ services: memcached-1: &memcached - << : *common - << : *default-labels + << : + - *common + - *default-labels ports: - "21211:11211" deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # placement: # constraints: [node.role == manager] # resources: diff --git a/cluster/docker-cluster.mysql.yml b/cluster/docker-cluster.mysql.yml index 9a599eb79..771f8879f 100644 --- a/cluster/docker-cluster.mysql.yml +++ b/cluster/docker-cluster.mysql.yml @@ -24,10 +24,10 @@ version: "3.9" x-common: &common - image: mysql:8.0.30 + image: mysql:8.0.33 restart: always env_file: - - ./cli/timezone.env + - ./scripts/cli/timezone.env x-deploy: &default-deploy @@ -52,8 +52,9 @@ services: mysql_master-1: &mysql_master - << : *common - << : *default-labels + << : + - *common + - *default-labels environment: MYSQL_ROOT_PASSWORD_FILE: /etc/mysql/db_root_password MYSQL_REPLICATION_USER: replication @@ -81,8 +82,9 @@ services: # --gtid-mode=on # --enforce-gtid-consistency deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels placement: constraints: [node.role == manager] # resources: @@ -126,8 +128,9 @@ services: mysql_node-1: &mysql_node - << : *common - << : *default-labels + << : + - *common + - *default-labels environment: MYSQL_ROOT_PASSWORD_FILE: /etc/mysql/db_root_password MYSQL_REPLICATION_USER: replication @@ -150,8 +153,9 @@ services: # - --gtid-mode=on # --enforce-gtid-consistency deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels replicas: 1 networks: cluster_mysql: diff --git a/cluster/docker-cluster.nginx.yml b/cluster/docker-cluster.nginx.yml index e04b01e11..d34fad4fa 100644 --- a/cluster/docker-cluster.nginx.yml +++ b/cluster/docker-cluster.nginx.yml @@ -11,7 +11,7 @@ x-common: # image: "khs1994/nginx:${LNMP_NGINX_VERSION:-1.17.8}-alpine" image: "nginx:${LNMP_NGINX_VERSION:-1.17.8}-alpine" restart: always - env_file: ./cli/timezone.env + env_file: ./scripts/cli/timezone.env networks: - frontend working_dir: /app @@ -58,9 +58,11 @@ services: - ./log/nginx:/var/log/nginx nginx-2: - << : *nginx_node - << : *common + << : + - *nginx_node + - *common nginx-3: - << : *nginx_node - << : *common + << : + - *nginx_node + - *common diff --git a/cluster/docker-cluster.redis.replication.yml b/cluster/docker-cluster.redis.replication.yml index fe4c779e0..d2994a7bd 100644 --- a/cluster/docker-cluster.redis.replication.yml +++ b/cluster/docker-cluster.redis.replication.yml @@ -36,7 +36,7 @@ x-common: environment: - REDIS_HOST=${CLUSTERKIT_REDIS_M_S_HOST:-192.168.199.100} env_file: - - ./cli/timezone.env + - ./scripts/cli/timezone.env networks: - cluster_redis_m_s # logging: @@ -55,8 +55,9 @@ x-labels: services: redis_m_s_master: - << : *common - << : *default-labels + << : + - *common + - *default-labels ports: - "22000:22000" volumes: @@ -75,8 +76,9 @@ services: "--aof-use-rdb-preamble yes" ] deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # replicas: 2 placement: constraints: [node.role == manager] @@ -84,8 +86,9 @@ services: # 从 master 复制数据 redis_m_s_node-1: &redis_m_s_node - << : *common - << : *default-labels + << : + - *common + - *default-labels ports: - "23000:23000" volumes: @@ -107,8 +110,9 @@ services: depends_on: - redis_m_s_master deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels replicas: 1 # placement: # constraints: [node.role == manager] diff --git a/cluster/docker-cluster.redis.sentinel.yml b/cluster/docker-cluster.redis.sentinel.yml index 87911ae6e..801d9d1be 100644 --- a/cluster/docker-cluster.redis.sentinel.yml +++ b/cluster/docker-cluster.redis.sentinel.yml @@ -33,7 +33,7 @@ x-common: environment: - REDIS_HOST=${CLUSTERKIT_REDIS_S_HOST:-192.168.199.100} env_file: - - ./cli/timezone.env + - ./scripts/cli/timezone.env networks: cluster_redis_s: # ipv4_address: 172.15.0.705 @@ -66,8 +66,9 @@ x-labels: services: redis_sentinel_master-1: - << : *common - << : *default-labels + << : + - *common + - *default-labels ports: - "20000:20000" entrypoint: /docker-entrypoint.redis.sh @@ -86,8 +87,9 @@ services: volumes: - cluster_redis_s_master-1-data:/data deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels placement: constraints: [node.role == manager] # resources: @@ -100,8 +102,9 @@ services: redis_sentinel_node-1: &redis_node - << : *common - << : *default-labels + << : + - *common + - *default-labels depends_on: - redis_sentinel_master-1 entrypoint: /docker-entrypoint.redis.sh @@ -121,8 +124,9 @@ services: volumes: - cluster_redis_s_node-1-data:/data deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # placement: # constraints: [node.role == manager] # resources: @@ -177,8 +181,9 @@ services: redis_sentinel_sentinel-1: &redis_sentinel_sentinel - << : *common - << : *default-labels + << : + - *common + - *default-labels depends_on: - redis_sentinel_master-1 ports: @@ -198,8 +203,9 @@ services: volumes: - cluster_redis_s_sentinel-1-data:/data deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels replicas: 1 # resources: # limits: diff --git a/cluster/docker-cluster.redis.yml b/cluster/docker-cluster.redis.yml index 3e3cc1f4c..29d01e796 100644 --- a/cluster/docker-cluster.redis.yml +++ b/cluster/docker-cluster.redis.yml @@ -31,7 +31,7 @@ x-common: image: redis:7.0.0-alpine restart: always env_file: - - ./cli/timezone.env + - ./scripts/cli/timezone.env networks: cluster_redis: # ipv4_address: 172.16.2.55 @@ -61,8 +61,9 @@ x-labels: services: redis_up: - << : *common - << : *default-labels + << : + - *common + - *default-labels restart: "on-failure" volumes: - ./cluster/redis/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh @@ -92,8 +93,9 @@ services: redis_master-1: &redis-master - << : *common - << : *default-labels + << : + - *common + - *default-labels command: [ "redis-server", "/redis.conf", @@ -110,8 +112,9 @@ services: volumes: - cluster_redis_master-1-data:/data deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels placement: constraints: [node.role == manager] # resources: @@ -173,8 +176,9 @@ services: redis_node-1: &redis-node - << : *common - << : *default-labels + << : + - *common + - *default-labels depends_on: - redis_master-1 ports: @@ -196,8 +200,9 @@ services: volumes: - cluster_redis_node-1-data:/data deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels replicas: 1 # resources: # limits: diff --git a/.git.template b/config/.git.template similarity index 100% rename from .git.template rename to config/.git.template diff --git a/config/.gitignore b/config/.gitignore index a59cea8ee..90baf048e 100644 --- a/config/.gitignore +++ b/config/.gitignore @@ -24,3 +24,4 @@ !s6 !s6-overlay !crontabs +!.git.template diff --git a/config/etc/docker/daemon.json b/config/etc/docker/daemon.json index ee91e3bee..6d08649cd 100644 --- a/config/etc/docker/daemon.json +++ b/config/etc/docker/daemon.json @@ -2,8 +2,7 @@ "registry-mirrors": [ "https://dockerproxy.com", "https://hub-mirror.c.163.com", - "https://mirror.baidubce.com", - "https://docker.mirrors.ustc.edu.cn" + "https://mirror.baidubce.com" ], "insecure-registries":[ "gcr.io" diff --git a/config/etc/docker/daemon.production.json b/config/etc/docker/daemon.production.json index a6576d88c..cf068f7e0 100644 --- a/config/etc/docker/daemon.production.json +++ b/config/etc/docker/daemon.production.json @@ -3,7 +3,6 @@ "https://dockerproxy.com", "https://hub-mirror.c.163.com", "https://mirror.baidubce.com", - "https://docker.mirrors.ustc.edu.cn", "https://docker.developer.khs1994.com" ], "debug": true, diff --git a/docker-lnmp.override.example.yml b/docker-lnmp.override.example.yml index ddc8c69fd..49ae6ecb6 100644 --- a/docker-lnmp.override.example.yml +++ b/docker-lnmp.override.example.yml @@ -27,11 +27,11 @@ services: # php8: # &php8 # # ! change php8 default image - # image: username/php:${LNMP_PHP8_VERSION:-8.1.9}-fpm-alpine + # image: username/php:${LNMP_PHP8_VERSION:-8.2.3}-fpm-alpine # # ! cn mirror image - # # image: ccr.ccs.tencentyun.com/khs1994/php:${LNMP_PHP8_VERSION:-8.1.9}-fpm-alpine + # # image: ccr.ccs.tencentyun.com/khs1994/php:${LNMP_PHP8_VERSION:-8.2.3}-fpm-alpine # # ! s6 - # # image: ${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP8_VERSION:-8.1.9}-s6-alpine + # # image: ${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP8_VERSION:-8.2.3}-s6-alpine # # command: [] # # ! open more port # ports: @@ -74,7 +74,7 @@ services: swoole: << : *common - image: ${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.1.9}-swoole-alpine + image: ${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.2.3}-swoole-alpine # command 指令只需传入文件名即可 command: - /app/swoole/index.php diff --git a/docker-lnmp.yml b/docker-lnmp.yml index 67c8ab9d5..460e8e10d 100644 --- a/docker-lnmp.yml +++ b/docker-lnmp.yml @@ -16,7 +16,7 @@ x-common-labels: x-common: &common restart: ${LNMP_RESTART:-always} - env_file: ./cli/timezone.env + env_file: ./scripts/cli/timezone.env networks: - backend read_only: ${LNMP_ROOT_FILESYSTEM_READ_ONLY:-false} @@ -32,9 +32,8 @@ x-tmpfs: services: mysql: - << : *common - << : *common-labels - image: "${LNMP_LIBRARY_NS:-library}/mysql:${LNMP_MYSQL_VERSION:-8.0.30}" + << : [*common,*common-labels] + image: "${LNMP_LIBRARY_NS:-library}/mysql:${LNMP_MYSQL_VERSION:-8.0.33}" environment: # @link https://github.com/docker-library/docs/tree/master/mysql#environment-variables # @link https://dev.mysql.com/doc/refman/8.0/en/environment-variables.html @@ -74,8 +73,7 @@ services: timeout: 5s redis: - << : *common - << : *common-labels + << : [*common,*common-labels] image: "${LNMP_LIBRARY_NS:-library}/redis:${LNMP_REDIS_VERSION:-7.0.0}-alpine" ports: - "${LNMP_REDIS_PORT:-127.0.0.1:6379}:6379" @@ -106,8 +104,7 @@ services: timeout: 5s memcached: - << : *common - << : *common-labels + << : [*common,*common-labels] image: ${LNMP_LIBRARY_NS:-library}/memcached:${LNMP_MEMCACHED_VERSION:-1.6.15}-alpine ports: - "${LNMP_MEMCACHED_PORT:-127.0.0.1:11211}:11211" @@ -121,9 +118,8 @@ services: php7: &php7 - << : *common - << : *common-labels - image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP7_VERSION:-7.4.32}-fpm-alpine" + << : [*common,*common-labels] + image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP7_VERSION:-7.4.33}-fpm-alpine" volumes: - &bind_app ${APP_ROOT:-./app}:${LNMP_PHP_PATH:-/app} # fpm config @@ -172,9 +168,8 @@ services: php8: &php8 - << : *common - << : *common-labels - image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP8_VERSION:-8.1.9}-fpm-alpine" + << : [*common,*common-labels] + image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP8_VERSION:-8.2.3}-fpm-alpine" volumes: - *bind_app # - ${APP_ROOT:-./app}:${LNMP_PHP_PATH:-/app} @@ -223,10 +218,9 @@ services: # - XDEBUG_MODE composer: - << : *common - << : *common-labels + << : [*common,*common-labels] restart: "no" - image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.1.9}-composer-alpine" + image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.2.3}-composer-alpine" volumes: - *bind_app # - ${APP_ROOT:-./app}:${LNMP_PHP_PATH:-/app} @@ -242,7 +236,7 @@ services: << : *php7 networks: - backend - image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-7.4.32}-supervisord-alpine" + image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-7.4.33}-supervisord-alpine" secrets: - source: supervisord_ini target: /etc/supervisor.d/supervisord.ini @@ -251,8 +245,7 @@ services: - "9003" phpmyadmin: - << : *common - << : *common-labels + << : [*common,*common-labels] image: ${LNMP_LIBRARY_NS:-library}/phpmyadmin:${LNMP_PHPMYADMIN_VERSION:-5.2.0} environment: - PMA_HOST=mysql @@ -271,8 +264,7 @@ services: # test: ["CMD-SHELL", "curl -f http://localhost || exit 1"] nginx: - << : *common - << : *common-labels + << : [*common,*common-labels] image: "${LNMP_LIBRARY_NS:-library}/nginx:${LNMP_NGINX_VERSION:-1.23.3}-alpine" ports: - "${LNMP_NGINX_HTTPS_PORT:-0.0.0.0:443}:443/udp" diff --git a/docker-production.yml b/docker-production.yml index 9133cc6bf..c4d6f3f4f 100644 --- a/docker-production.yml +++ b/docker-production.yml @@ -33,7 +33,7 @@ x-logging: x-common: &common env_file: - - ./cli/timezone.env + - ./scripts/cli/timezone.env networks: - backend read_only: false @@ -74,7 +74,7 @@ x-build-debian: x-php-common: &default-php - image: khs1994/php:8.1.9-fpm-alpine + image: khs1994/php:8.2.3-fpm-alpine volumes: - ./app:/app - type: volume @@ -111,14 +111,13 @@ x-php-common: services: mysql: - << : *common - << : *default-labels + << : [*common,*default-labels] build: << : *default-build-debian context: ./dockerfile/mysql/ dockerfile: Dockerfile - image: mysql:8.0.30 - # image: khs1994/lnmp-mysql:8.0.30 + image: mysql:8.0.33 + # image: khs1994/lnmp-mysql:8.0.33 # image: username/lnmp-mysql:tag environment: # MYSQL_ROOT_PASSWORD: mytest @@ -133,8 +132,7 @@ services: command: ["mysqld","--character-set-server=utf8mb4","--default-authentication-plugin=mysql_native_password"] # logging: *default-logging deploy: - << : *default-deploy - << : *default-labels + << : [*default-deploy,*default-labels] placement: constraints: [node.role == manager] # resources: @@ -156,8 +154,7 @@ services: tmpfs: /var/run/mysqld # mariadb: - # << : *common - # << : *default-labels + # << : [*common,*default-labels] # build: # << : *default-build-debian # context: ./dockerfile/mariadb/ @@ -181,8 +178,7 @@ services: # - mysqld # - --character-set-server=utf8mb4 # deploy: - # << : *default-deploy - # << : *default-labels + # << : [*default-deploy,*default-labels] # placement: # constraints: [node.role == manager] # # logging: *default-logging @@ -193,8 +189,7 @@ services: # target: /etc/mysql/conf.d/docker.cnf redis: - << : *common - << : *default-labels + << : [*common,*default-labels] build: << : *default-build # << : *default-build-debian @@ -218,8 +213,9 @@ services: ] # logging: *default-logging deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # replicas: 2 placement: constraints: [node.role == manager] @@ -228,8 +224,9 @@ services: target: /redis.conf # memcached: - # << : *common - # << : *default-labels + # << : + # - *common + # - *default-labels # build: # << : *default-build # # << : *default-build-debian @@ -329,9 +326,10 @@ services: # target: /etc/mongod.conf pcit: - << : *common - << : *default-labels - << : *default-php + << : + - *common + - *default-labels + - *default-php image: pcit/pcit:unit volumes: - ./pcit/.env.production:/app/pcit/.env.production @@ -347,8 +345,9 @@ services: extra_hosts: - "api.github.com:140.82.114.6" deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # replicas: 2 placement: constraints: [node.role == manager] @@ -361,10 +360,11 @@ services: memory: 128M php7: - << : *common - << : *default-labels - << : *default-php - # image: khs1994/php:8.1.9-s6-alpine + << : + - *common + - *default-labels + - *default-php + # image: khs1994/php:8.2.3-s6-alpine # entrypoint: # - /s6-init build: @@ -385,8 +385,9 @@ services: - PATH=/command:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin # logging: *default-logging deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # replicas: 2 placement: constraints: [node.role == manager] @@ -409,8 +410,9 @@ services: # constraints: [node.role == manager] nginx: - << : *common - << : *default-labels + << : + - *common + - *default-labels build: << : *default-build # << : *default-build-debian @@ -435,8 +437,9 @@ services: - minio # logging: *default-logging deploy: - << : *default-deploy - << : *default-labels + << : + - *default-deploy + - *default-labels # replicas: 2 placement: constraints: [node.role == manager] @@ -506,8 +509,9 @@ services: # start_period: 40s # httpd: - # << : *common - # << : *default-labels + # << : + # - *common + # - *default-labels # build: # << : *default-build # # << : *default-build-debian @@ -530,9 +534,10 @@ services: # depends_on: # - php7 # # logging: *default-logging - # deploy: - # << : *default-deploy - # << : *default-labels + # deploy: + # << : + # - *default-deploy + # - *default-labels # placement: # constraints: [node.role == manager] # configs: @@ -563,8 +568,9 @@ services: # # target: /usr/local/apache2/conf.d/ssl/domain.com.key # registry: - # << : *common - # << : *default-labels + # << : + # - *common + # - *default-labels # build: # << : *default-build # # << : *default-build-debian @@ -581,9 +587,10 @@ services: # volumes: # # - ./config/registry:/etc/docker/registry # - registry-data:/var/lib/registry - # deploy: - # << : *default-deploy - # << : *default-labels + # deploy: + # << : + # - *default-deploy + # - *default-labels # placement: # constraints: [node.role == manager] # # logging: *default-logging @@ -592,8 +599,9 @@ services: # target: /etc/docker/registry/config.yml minio: - << : *common - << : *default-labels + << : + - *common + - *default-labels image: minio/minio:RELEASE.2022-10-24T18-35-07Z command: - server diff --git a/docker-workspace.example.yml b/docker-workspace.example.yml index 6d5b05173..e2f1b5614 100644 --- a/docker-workspace.example.yml +++ b/docker-workspace.example.yml @@ -11,7 +11,7 @@ x-common: services: workspace: &workspace - image: ${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.1.9}-composer-alpine + image: ${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.2.3}-composer-alpine networks: - backend volumes: @@ -68,14 +68,16 @@ services: - 9003:9003 composer: - << : *workspace - << : *common - image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.1.9}-composer-alpine" + << : + - *workspace + - *common + image: "${LNMP_DOCKER_IMAGE_PREFIX:-khs1994}/php:${LNMP_PHP_VERSION:-8.2.3}-composer-alpine" command: [] # install | update npm: - << : *workspace - << : *common + << : + - *workspace + - *common image: node:${LNMP_NODE_VERSION:-18.2.0}-alpine entrypoint: npm command: [] # install | ["run","dev"] | diff --git a/dockerfile/mysql/.env.example b/dockerfile/mysql/.env.example index 2b09350e0..bed1fa579 100644 --- a/dockerfile/mysql/.env.example +++ b/dockerfile/mysql/.env.example @@ -1,2 +1,2 @@ DOCKER_HUB_USERNAME=khs1994 -TAG=8.0.30 +TAG=8.0.33 diff --git a/dockerfile/mysql/docker-compose.yml b/dockerfile/mysql/docker-compose.yml index bf60d3f14..96d52c2b8 100644 --- a/dockerfile/mysql/docker-compose.yml +++ b/dockerfile/mysql/docker-compose.yml @@ -7,4 +7,4 @@ services: args: DEB_URL: mirrors.ustc.edu.cn # deb.debian.org DEB_SECURITY_URL: mirrors.ustc.edu.cn/debian-security # security.debian.org/debian-security - image: ${DOCKER_HUB_USERNAME:-khs1994}/mysql:${TAG:-8.0.30} + image: ${DOCKER_HUB_USERNAME:-khs1994}/mysql:${TAG:-8.0.33} diff --git a/dockerfile/mysql/example.Dockerfile b/dockerfile/mysql/example.Dockerfile index e94dd3ba2..94f9b6fd7 100644 --- a/dockerfile/mysql/example.Dockerfile +++ b/dockerfile/mysql/example.Dockerfile @@ -1,4 +1,4 @@ -FROM mysql:8.0.30 +FROM mysql:8.0.33 LABEL maintainer="khs1994-docker/lnmp " diff --git a/dockerfile/php/.env.example b/dockerfile/php/.env.example index 6ea18013e..aa4c03e5c 100644 --- a/dockerfile/php/.env.example +++ b/dockerfile/php/.env.example @@ -1,10 +1,10 @@ DOCKER_HUB_USERNAME=khs1994 -PHP_VERSION_81=8.1.9 -PHP_VERSION_80=8.0.23 -PHP_VERSION_74=7.4.32 -PHP_VERSION_82=8.2.0 +PHP_VERSION_82=8.2.3 +PHP_VERSION_81=8.1.12 +PHP_VERSION_80=8.0.26 # EOL +PHP_VERSION_74=7.4.33 PHP_VERSION_73=7.3.33 PHP_VERSION_72=7.2.34 PHP_VERSION_71=7.1.33 @@ -12,7 +12,7 @@ PHP_VERSION_70=7.0.33 PHP_VERSION_56=5.6.40 # https://github.com/composer/composer/tags -COMPOSER_VERSION=2.5.1 +COMPOSER_VERSION=2.5.5 # https://github.com/swoole/swoole-src/tags SWOOLE_VERSION=5.0.0 # https://github.com/nginx/unit/tags @@ -32,4 +32,4 @@ PHPMD_VERSION=2.11.1 DOCTUM_VERSION=5.5.1 # https://github.com/just-containers/s6-overlay/tags -S6_VERSION=3.1.1.2 +S6_VERSION=3.1.4.2 diff --git a/dockerfile/php/.github/workflows/php_7_4.yml b/dockerfile/php/.github/workflows/php_7_4.yml index 30e3caf6b..46b2cdf64 100644 --- a/dockerfile/php/.github/workflows/php_7_4.yml +++ b/dockerfile/php/.github/workflows/php_7_4.yml @@ -9,7 +9,7 @@ on: PHP_VERSION: description: php version required: true - default: "7.4.32" + default: "7.4.33" name: PHP_7.4 @@ -204,7 +204,7 @@ jobs: PLATFORM: linux/amd64,linux/arm64 #,linux/arm/v7 PHP_VERSION: 7_4_X FOLDER: 7.4 - PHP_TAG_VERSION: 7.4.32 + PHP_TAG_VERSION: 7.4.33 TYPE: ${{ matrix.TYPE }} add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php name: 'Build Image' diff --git a/dockerfile/php/.github/workflows/php_8_0.yml b/dockerfile/php/.github/workflows/php_8_0.yml index 5c684afcb..8f3c6f7b5 100644 --- a/dockerfile/php/.github/workflows/php_8_0.yml +++ b/dockerfile/php/.github/workflows/php_8_0.yml @@ -9,7 +9,7 @@ on: PHP_VERSION: description: php version required: true - default: "8.0.23" + default: "8.0.26" name: PHP_8.0 @@ -194,7 +194,7 @@ jobs: PLATFORM: linux/amd64,linux/arm64 #,linux/arm/v7 PHP_VERSION: 8_0_X FOLDER: "8.0" - PHP_TAG_VERSION: "8.0.23" + PHP_TAG_VERSION: "8.0.26" TYPE: ${{ matrix.TYPE }} add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php name: 'Build Image' diff --git a/dockerfile/php/.github/workflows/php_8_1.yml b/dockerfile/php/.github/workflows/php_8_1.yml index d366a7936..83827c024 100644 --- a/dockerfile/php/.github/workflows/php_8_1.yml +++ b/dockerfile/php/.github/workflows/php_8_1.yml @@ -9,7 +9,7 @@ on: PHP_VERSION: description: php version required: true - default: "8.1.9" + default: "8.1.12" name: PHP_8.1 @@ -194,7 +194,7 @@ jobs: PLATFORM: linux/amd64,linux/arm64 #,linux/arm/v7 PHP_VERSION: 8_1_X FOLDER: "8.1" - PHP_TAG_VERSION: "8.1.9" + PHP_TAG_VERSION: "8.1.12" TYPE: ${{ matrix.TYPE }} add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php name: 'Build Image' diff --git a/dockerfile/php/.github/workflows/php_8_2.yml b/dockerfile/php/.github/workflows/php_8_2.yml index c0f849566..b2ca52588 100644 --- a/dockerfile/php/.github/workflows/php_8_2.yml +++ b/dockerfile/php/.github/workflows/php_8_2.yml @@ -9,7 +9,7 @@ on: PHP_VERSION: description: php version required: true - default: "8.2.0" + default: "8.2.3" name: PHP_8.2 @@ -194,7 +194,7 @@ jobs: PLATFORM: linux/amd64,linux/arm64 #,linux/arm/v7 PHP_VERSION: 8_2_X FOLDER: "8.2" - PHP_TAG_VERSION: "8.2.0" + PHP_TAG_VERSION: "8.2.3" TYPE: ${{ matrix.TYPE }} add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php name: 'Build Image' diff --git a/dockerfile/php/.github/workflows/php_zz_tool.yml b/dockerfile/php/.github/workflows/php_zz_tool.yml index 9d9ca87c3..ed8f0d4a0 100644 --- a/dockerfile/php/.github/workflows/php_zz_tool.yml +++ b/dockerfile/php/.github/workflows/php_zz_tool.yml @@ -9,7 +9,7 @@ on: PHP_VERSION: description: php version required: true - default: "8.1.9" + default: "8.1.12" name: PHP_TOOL @@ -180,7 +180,7 @@ jobs: PLATFORM: linux/amd64,linux/arm64 #,linux/arm/v7 PHP_VERSION: 8_1_X FOLDER: "8.1" - PHP_TAG_VERSION: "8.1.9" + PHP_TAG_VERSION: "8.1.12" TYPE: ${{ matrix.TYPE }} add_mirror: registry.us-east-1.aliyuncs.com/khs1994-us/php pcit-docker.pkg.coding.net/khs1994-docker/khs1994/php ghcr.io/khs1994/php name: 'Build Image' diff --git a/dockerfile/php/7.2/composer/Dockerfile b/dockerfile/php/7.2/composer/Dockerfile index 89b64cc91..21cd96e64 100644 --- a/dockerfile/php/7.2/composer/Dockerfile +++ b/dockerfile/php/7.2/composer/Dockerfile @@ -18,12 +18,12 @@ ENV COMPOSER_DEP_APKS \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ COMPOSER_NO_INTERACTION=1 \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/7.2/stretch/Dockerfile b/dockerfile/php/7.2/stretch/Dockerfile index da213c5e3..2c67c42a8 100644 --- a/dockerfile/php/7.2/stretch/Dockerfile +++ b/dockerfile/php/7.2/stretch/Dockerfile @@ -160,12 +160,12 @@ RUN sed -i "s!deb.debian.org!${DEB_URL}!g" /etc/apt/sources.list \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && { echo "memory_limit=-1"; \ echo "date.timezone=${PHP_TIMEZONE:-PRC}"; \ diff --git a/dockerfile/php/7.3/composer/Dockerfile b/dockerfile/php/7.3/composer/Dockerfile index d3b05b495..3b89dc3b9 100644 --- a/dockerfile/php/7.3/composer/Dockerfile +++ b/dockerfile/php/7.3/composer/Dockerfile @@ -18,12 +18,12 @@ ENV COMPOSER_DEP_APKS \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ COMPOSER_NO_INTERACTION=1 \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/7.4/cli/Dockerfile b/dockerfile/php/7.4/cli/Dockerfile index 07a57bc53..fbbd65829 100644 --- a/dockerfile/php/7.4/cli/Dockerfile +++ b/dockerfile/php/7.4/cli/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-alpine as upstream @@ -10,7 +10,7 @@ LABEL maintainer="khs1994-docker/lnmp " ENV TZ=Asia/Shanghai \ APP_ENV=development -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG ALPINE_URL=dl-cdn.alpinelinux.org @@ -152,7 +152,7 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie" # ENV GPG_KEYS 1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F ENV PHP_VERSION=${PHP_VERSION} -# ENV PHP_URL="https://www.php.net/get/php-7.4.32.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-7.4.32.tar.xz.asc/from/this/mirror" +# ENV PHP_URL="https://www.php.net/get/php-7.4.33.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-7.4.33.tar.xz.asc/from/this/mirror" # ENV PHP_SHA256="da1a705c0bc46410e330fc6baa967666c8cd2985378fb9707c01a8e33b01d985" PHP_MD5="" # COPY --from=php:alpine /usr/local/bin/docker-php-* /usr/local/bin/ diff --git a/dockerfile/php/7.4/composer/Dockerfile b/dockerfile/php/7.4/composer/Dockerfile index fafc4777c..7ba2fdd76 100644 --- a/dockerfile/php/7.4/composer/Dockerfile +++ b/dockerfile/php/7.4/composer/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 # ARG BASE=fpm ARG BASE=cli @@ -28,12 +28,12 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 \ # COMPOSER_MEMORY_LIMIT= \ COMPOSER_PROCESS_TIMEOUT=300 \ # COMPOSER_SELF_UPDATE_TARGET= \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/7.4/ext/mongodb/Dockerfile b/dockerfile/php/7.4/ext/mongodb/Dockerfile index 20c4baccd..0ad18e1f1 100644 --- a/dockerfile/php/7.4/ext/mongodb/Dockerfile +++ b/dockerfile/php/7.4/ext/mongodb/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-cli-alpine as builder @@ -16,7 +16,7 @@ ENV EXT_VERSION=x.y.z ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:7.4.32-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:7.4.33-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .ext_build_deps \ diff --git a/dockerfile/php/7.4/ext/yaml/Dockerfile b/dockerfile/php/7.4/ext/yaml/Dockerfile index 0cbcd356e..5f8997770 100644 --- a/dockerfile/php/7.4/ext/yaml/Dockerfile +++ b/dockerfile/php/7.4/ext/yaml/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-cli-alpine as builder @@ -16,7 +16,7 @@ ENV EXT_VERSION=x.y.z ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:7.4.32-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:7.4.33-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .ext_build_deps \ diff --git a/dockerfile/php/7.4/ext/zstd/Dockerfile b/dockerfile/php/7.4/ext/zstd/Dockerfile index 9fb0c5ce9..7d9b5c7cc 100644 --- a/dockerfile/php/7.4/ext/zstd/Dockerfile +++ b/dockerfile/php/7.4/ext/zstd/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-cli-alpine as builder @@ -16,7 +16,7 @@ ENV EXT_VERSION=0.11.0 ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:7.4.32-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:7.4.33-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .ext_build_deps \ diff --git a/dockerfile/php/7.4/fpm/Dockerfile b/dockerfile/php/7.4/fpm/Dockerfile index d57906cc1..1fb9464eb 100644 --- a/dockerfile/php/7.4/fpm/Dockerfile +++ b/dockerfile/php/7.4/fpm/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-fpm-alpine3.16 as php diff --git a/dockerfile/php/7.4/s6/Dockerfile b/dockerfile/php/7.4/s6/Dockerfile index 75016f4bd..0868a2c5f 100644 --- a/dockerfile/php/7.4/s6/Dockerfile +++ b/dockerfile/php/7.4/s6/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 ARG BASE=fpm FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-${BASE}-alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ && tar -xvf /tmp/s6/s6-overlay.tar.xz -C / \ diff --git a/dockerfile/php/7.4/single/Dockerfile b/dockerfile/php/7.4/single/Dockerfile index 3dc3ff361..23f5245cc 100644 --- a/dockerfile/php/7.4/single/Dockerfile +++ b/dockerfile/php/7.4/single/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-fpm-alpine diff --git a/dockerfile/php/7.4/supervisord/Dockerfile b/dockerfile/php/7.4/supervisord/Dockerfile index c859b0167..330a15b2b 100644 --- a/dockerfile/php/7.4/supervisord/Dockerfile +++ b/dockerfile/php/7.4/supervisord/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 ARG BASE=fpm diff --git a/dockerfile/php/7.4/swoole/Dockerfile b/dockerfile/php/7.4/swoole/Dockerfile index 5be42b7d3..2e99b0842 100644 --- a/dockerfile/php/7.4/swoole/Dockerfile +++ b/dockerfile/php/7.4/swoole/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 ARG BASE=cli @@ -27,7 +27,7 @@ ENV SWOOLE_VERSION=v4.8.11 ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:7.4.32-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:7.4.33-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .pecl_build_deps \ diff --git a/dockerfile/php/7.4/unit/Dockerfile b/dockerfile/php/7.4/unit/Dockerfile index bff7b6761..cf09f8695 100644 --- a/dockerfile/php/7.4/unit/Dockerfile +++ b/dockerfile/php/7.4/unit/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-cli-alpine diff --git a/dockerfile/php/8.0/cli/Dockerfile b/dockerfile/php/8.0/cli/Dockerfile index 1fe6c00c3..0628a6a65 100644 --- a/dockerfile/php/8.0/cli/Dockerfile +++ b/dockerfile/php/8.0/cli/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-alpine as upstream @@ -10,7 +10,7 @@ LABEL maintainer="khs1994-docker/lnmp " ENV TZ=Asia/Shanghai \ APP_ENV=development -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG ALPINE_URL=dl-cdn.alpinelinux.org @@ -142,7 +142,7 @@ ENV PHP_LDFLAGS="-Wl,-O1 -pie" # ENV GPG_KEYS 1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F ENV PHP_VERSION=${PHP_VERSION} -# ENV PHP_URL="https://www.php.net/get/php-7.4.32.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-7.4.32.tar.xz.asc/from/this/mirror" +# ENV PHP_URL="https://www.php.net/get/php-7.4.33.tar.xz/from/this/mirror" PHP_ASC_URL="https://www.php.net/get/php-7.4.33.tar.xz.asc/from/this/mirror" # ENV PHP_SHA256="da1a705c0bc46410e330fc6baa967666c8cd2985378fb9707c01a8e33b01d985" PHP_MD5="" # COPY --from=php:alpine /usr/local/bin/docker-php-* /usr/local/bin/ diff --git a/dockerfile/php/8.0/composer/Dockerfile b/dockerfile/php/8.0/composer/Dockerfile index 14a60d492..7b7880500 100644 --- a/dockerfile/php/8.0/composer/Dockerfile +++ b/dockerfile/php/8.0/composer/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG USERNAME=khs1994 # ARG BASE=fpm ARG BASE=cli @@ -19,12 +19,12 @@ ENV COMPOSER_DEP_APKS \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ COMPOSER_NO_INTERACTION=1 \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/8.0/fpm/Dockerfile b/dockerfile/php/8.0/fpm/Dockerfile index 6ebd2f777..dc376ad89 100644 --- a/dockerfile/php/8.0/fpm/Dockerfile +++ b/dockerfile/php/8.0/fpm/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-fpm-alpine3.16 as php diff --git a/dockerfile/php/8.0/s6/Dockerfile b/dockerfile/php/8.0/s6/Dockerfile index 410c603d3..e3bc598ce 100644 --- a/dockerfile/php/8.0/s6/Dockerfile +++ b/dockerfile/php/8.0/s6/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG USERNAME=khs1994 ARG BASE=fpm FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-${BASE}-alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ && tar -xvf /tmp/s6/s6-overlay.tar.xz -C / \ diff --git a/dockerfile/php/8.0/swoole/Dockerfile b/dockerfile/php/8.0/swoole/Dockerfile index 158e328f4..ddb012207 100644 --- a/dockerfile/php/8.0/swoole/Dockerfile +++ b/dockerfile/php/8.0/swoole/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG USERNAME=khs1994 ARG BASE=cli @@ -27,7 +27,7 @@ ENV SWOOLE_VERSION=v5.0.0 ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:8.0.23-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:8.0.26-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .pecl_build_deps \ diff --git a/dockerfile/php/8.0/unit/Dockerfile b/dockerfile/php/8.0/unit/Dockerfile index 4ac06c889..38ff44f6e 100644 --- a/dockerfile/php/8.0/unit/Dockerfile +++ b/dockerfile/php/8.0/unit/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG USERNAME=khs1994 ARG BASE=cli diff --git a/dockerfile/php/8.1/cli/Dockerfile b/dockerfile/php/8.1/cli/Dockerfile index f4faa4b38..8d2cbb123 100644 --- a/dockerfile/php/8.1/cli/Dockerfile +++ b/dockerfile/php/8.1/cli/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-alpine as upstream @@ -10,7 +10,7 @@ LABEL maintainer="khs1994-docker/lnmp " ENV TZ=Asia/Shanghai \ APP_ENV=development -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 ARG ALPINE_URL=dl-cdn.alpinelinux.org diff --git a/dockerfile/php/8.1/composer/Dockerfile b/dockerfile/php/8.1/composer/Dockerfile index 9f7d31ece..0d0743fc1 100644 --- a/dockerfile/php/8.1/composer/Dockerfile +++ b/dockerfile/php/8.1/composer/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 ARG USERNAME=khs1994 # ARG BASE=fpm ARG BASE=cli @@ -19,12 +19,12 @@ ENV COMPOSER_DEP_APKS \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ COMPOSER_NO_INTERACTION=1 \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/8.1/fpm/Dockerfile b/dockerfile/php/8.1/fpm/Dockerfile index b4910f660..1da3df7cc 100644 --- a/dockerfile/php/8.1/fpm/Dockerfile +++ b/dockerfile/php/8.1/fpm/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-fpm-alpine3.16 as php diff --git a/dockerfile/php/8.1/s6/Dockerfile b/dockerfile/php/8.1/s6/Dockerfile index 654168a76..a0957c7ee 100644 --- a/dockerfile/php/8.1/s6/Dockerfile +++ b/dockerfile/php/8.1/s6/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 ARG USERNAME=khs1994 ARG BASE=fpm FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-${BASE}-alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ --network=none \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ diff --git a/dockerfile/php/8.1/swoole/Dockerfile b/dockerfile/php/8.1/swoole/Dockerfile index 32cb74085..1e9bebd84 100644 --- a/dockerfile/php/8.1/swoole/Dockerfile +++ b/dockerfile/php/8.1/swoole/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 ARG USERNAME=khs1994 ARG BASE=cli @@ -27,7 +27,7 @@ ENV SWOOLE_VERSION=v5.0.0 ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:8.1.9-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:8.1.12-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .pecl_build_deps \ diff --git a/dockerfile/php/8.1/unit/Dockerfile b/dockerfile/php/8.1/unit/Dockerfile index fc37bd79c..06c021a98 100644 --- a/dockerfile/php/8.1/unit/Dockerfile +++ b/dockerfile/php/8.1/unit/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 ARG USERNAME=khs1994 ARG BASE=cli diff --git a/dockerfile/php/8.2/cli/Dockerfile b/dockerfile/php/8.2/cli/Dockerfile index db36f73b5..d3ad2f495 100644 --- a/dockerfile/php/8.2/cli/Dockerfile +++ b/dockerfile/php/8.2/cli/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-alpine as upstream @@ -10,7 +10,7 @@ LABEL maintainer="khs1994-docker/lnmp " ENV TZ=Asia/Shanghai \ APP_ENV=development -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 ARG ALPINE_URL=dl-cdn.alpinelinux.org diff --git a/dockerfile/php/8.2/composer/Dockerfile b/dockerfile/php/8.2/composer/Dockerfile index e9b9e6d6e..b3c65c529 100644 --- a/dockerfile/php/8.2/composer/Dockerfile +++ b/dockerfile/php/8.2/composer/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 ARG USERNAME=khs1994 # ARG BASE=fpm ARG BASE=cli @@ -19,12 +19,12 @@ ENV COMPOSER_DEP_APKS \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ COMPOSER_NO_INTERACTION=1 \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/8.2/fpm/Dockerfile b/dockerfile/php/8.2/fpm/Dockerfile index 18bf2a917..dc2dc284d 100644 --- a/dockerfile/php/8.2/fpm/Dockerfile +++ b/dockerfile/php/8.2/fpm/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 FROM --platform=$TARGETPLATFORM php:${PHP_VERSION}-fpm-alpine3.17 as php diff --git a/dockerfile/php/8.2/s6/Dockerfile b/dockerfile/php/8.2/s6/Dockerfile index c6b098aa3..c9e4a76ff 100644 --- a/dockerfile/php/8.2/s6/Dockerfile +++ b/dockerfile/php/8.2/s6/Dockerfile @@ -1,12 +1,12 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 ARG USERNAME=khs1994 ARG BASE=fpm FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-${BASE}-alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ --network=none \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ diff --git a/dockerfile/php/8.2/swoole/Dockerfile b/dockerfile/php/8.2/swoole/Dockerfile index ec0655798..c011b1934 100644 --- a/dockerfile/php/8.2/swoole/Dockerfile +++ b/dockerfile/php/8.2/swoole/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 ARG USERNAME=khs1994 ARG BASE=cli @@ -27,7 +27,7 @@ ENV SWOOLE_VERSION=master ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:8.2.0-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:8.2.3-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_URL}/g" /etc/apk/repositories \ && apk add --no-cache --virtual .pecl_build_deps \ diff --git a/dockerfile/php/8.2/unit/Dockerfile b/dockerfile/php/8.2/unit/Dockerfile index 6a5c407c3..6eb715905 100644 --- a/dockerfile/php/8.2/unit/Dockerfile +++ b/dockerfile/php/8.2/unit/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.2.0 +ARG PHP_VERSION=8.2.3 ARG USERNAME=khs1994 ARG BASE=cli diff --git a/dockerfile/php/README.md b/dockerfile/php/README.md index eb6f3af12..ef4ddd76e 100644 --- a/dockerfile/php/README.md +++ b/dockerfile/php/README.md @@ -14,26 +14,28 @@ ## 后缀 -* 8.1.9-cli-alpine -* 8.1.9-fpm-alpine -* 8.1.9-unit-alpine (based cli) -* 8.1.9-composer-alpine (based fpm) -* 8.1.9-swoole-alpine (based cli) -* 8.1.9-s6-alpine (based fpm) +* 8.2.3-cli-alpine +* 8.2.3-fpm-alpine +* 8.2.3-unit-alpine (based cli) +* 8.2.3-composer-alpine (based fpm) +* 8.2.3-swoole-alpine (based cli) +* 8.2.3-s6-alpine (based fpm) ## Supported tags and respective `Dockerfile` links -* [`8.1.9-fpm-alpine` (8.1/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.1.9/8.1/fpm/Dockerfile) +* [`8.2.3-fpm-alpine` (8.2/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.2.3/8.2/fpm/Dockerfile) -* [`8.0.23-fpm-alpine` (8.0/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.1.9/8.0/fpm/Dockerfile) +* [`8.1.12-fpm-alpine` (8.1/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.2.3/8.1/fpm/Dockerfile) -* [`7.4.32-fpm-alpine` (7.4/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.1.9/7.4/fpm/Dockerfile) +* [`8.0.26-fpm-alpine` (8.0/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.2.3/8.0/fpm/Dockerfile) * [`nightly-fpm-alpine` (nightly/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/master/nightly/fpm/Dockerfile) -* [`7.3.33-fpm-alpine` (7.3/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.1.9/7.3/fpm/Dockerfile) +* [`7.4.33-fpm-alpine` (7.4/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.2.3/7.4/fpm/Dockerfile) -* [`7.2.34-fpm-alpine` (7.2/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.1.9/7.2/fpm/Dockerfile) +* [`7.3.33-fpm-alpine` (7.3/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.2.3/7.3/fpm/Dockerfile) + +* [`7.2.34-fpm-alpine` (7.2/fpm/Dockerfile)](https://github.com/khs1994-docker/php/blob/8.2.3/7.2/fpm/Dockerfile) ## Overview @@ -164,9 +166,9 @@ $ for ext in `ls /usr/src/php/ext`; do echo '*' $( php -r "if(extension_loaded(' * https://sources.debian.org/src/php7.3/7.3.29-1~deb10u1/debian/control/ -* https://sources.debian.org/src/php7.4/7.4.32-1+deb11u1/debian/control/ +* https://sources.debian.org/src/php7.4/7.4.33-1+deb11u1/debian/control/ -* https://sources.debian.org/src/php8.1/8.1.9-1/debian/control/ +* https://sources.debian.org/src/php8.1/8.2.3-1/debian/control/ * https://ram.tianon.xyz/post/2017/12/26/dockerize-compiled-software.html diff --git a/dockerfile/php/docker-compose.yml b/dockerfile/php/docker-compose.yml index e014b4431..b6c399a83 100644 --- a/dockerfile/php/docker-compose.yml +++ b/dockerfile/php/docker-compose.yml @@ -16,11 +16,11 @@ services: build: context: ./7.4/fpm args: - PHP_VERSION: 7.4.32 + PHP_VERSION: 7.4.33 IMAGE: alpine ALPINE_URL: mirrors.aliyun.com target: php - image: ${DOCKER_HUB_USERNAME:-khs1994}/php:${PHP_VERSION_74:-7.4.32}-fpm-alpine + image: ${DOCKER_HUB_USERNAME:-khs1994}/php:${PHP_VERSION_74:-7.4.33}-fpm-alpine 7_3_X: build: diff --git a/dockerfile/php/doctum/Dockerfile b/dockerfile/php/doctum/Dockerfile index 4c5a0e54c..4dc8cf858 100644 --- a/dockerfile/php/doctum/Dockerfile +++ b/dockerfile/php/doctum/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG USERNAME=khs1994 ARG BASE=composer diff --git a/dockerfile/php/nightly/composer/Dockerfile b/dockerfile/php/nightly/composer/Dockerfile index 147d7ebf2..af254e871 100644 --- a/dockerfile/php/nightly/composer/Dockerfile +++ b/dockerfile/php/nightly/composer/Dockerfile @@ -24,12 +24,12 @@ ENV COMPOSER_DEP_APKS \ ENV COMPOSER_ALLOW_SUPERUSER=1 \ COMPOSER_HOME=/tmp/composer \ COMPOSER_NO_INTERACTION=1 \ - COMPOSER_VERSION=2.5.1 \ + COMPOSER_VERSION=2.5.5 \ PS1="[\u@\h \w]# " # https://github.com/composer/docker -RUN --mount=type=bind,from=composer:2.5.1,source=/usr/bin/composer,target=/opt/bin/composer \ +RUN --mount=type=bind,from=composer:2.5.5,source=/usr/bin/composer,target=/opt/bin/composer \ set -x \ && apk add --no-cache --virtual .composer_deps $COMPOSER_DEP_APKS \ && { echo "memory_limit=-1"; \ diff --git a/dockerfile/php/nightly/s6/Dockerfile b/dockerfile/php/nightly/s6/Dockerfile index 184bbde90..3ebbbcc0b 100644 --- a/dockerfile/php/nightly/s6/Dockerfile +++ b/dockerfile/php/nightly/s6/Dockerfile @@ -6,7 +6,7 @@ ARG BASE=fpm FROM --platform=$TARGETPLATFORM ${USERNAME}/php:${PHP_VERSION}-${BASE}-alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ --network=none \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ diff --git a/dockerfile/php/php-cs-fixer/Dockerfile b/dockerfile/php/php-cs-fixer/Dockerfile index 2fc3eb1e0..319a853ef 100644 --- a/dockerfile/php/php-cs-fixer/Dockerfile +++ b/dockerfile/php/php-cs-fixer/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.1.9 +ARG PHP_VERSION=8.1.12 ARG USERNAME=khs1994 ARG BASE=composer diff --git a/dockerfile/php/phpcpd/Dockerfile b/dockerfile/php/phpcpd/Dockerfile index b3b77d1eb..396c30a8b 100644 --- a/dockerfile/php/phpcpd/Dockerfile +++ b/dockerfile/php/phpcpd/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 ARG BASE=composer diff --git a/dockerfile/php/phpdox/Dockerfile b/dockerfile/php/phpdox/Dockerfile index 36c7cbd4d..fd8755409 100644 --- a/dockerfile/php/phpdox/Dockerfile +++ b/dockerfile/php/phpdox/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 ARG BASE=composer @@ -27,8 +27,8 @@ ENV EXT_RUN_DEP \ ARG ALPINE_URL=dl-cdn.alpinelinux.org -RUN --mount=type=bind,from=php:7.4.32-cli-alpine,source=/usr/src,target=/usr/local/src,rw \ - --mount=type=bind,from=php:7.4.32-cli-alpine,source=/usr/local/bin,target=/opt/bin,rw \ +RUN --mount=type=bind,from=php:7.4.33-cli-alpine,source=/usr/src,target=/usr/local/src,rw \ + --mount=type=bind,from=php:7.4.33-cli-alpine,source=/usr/local/bin,target=/opt/bin,rw \ set -x \ && export PATH=$PATH:/opt/bin \ && mkdir -p /usr/src \ diff --git a/dockerfile/php/phploc/Dockerfile b/dockerfile/php/phploc/Dockerfile index c1b662568..2af440c43 100644 --- a/dockerfile/php/phploc/Dockerfile +++ b/dockerfile/php/phploc/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=7.4.32 +ARG PHP_VERSION=7.4.33 ARG USERNAME=khs1994 ARG BASE=composer diff --git a/dockerfile/php/phpmd/Dockerfile b/dockerfile/php/phpmd/Dockerfile index 44d9fc7ff..7f8e9d1bc 100644 --- a/dockerfile/php/phpmd/Dockerfile +++ b/dockerfile/php/phpmd/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:labs -ARG PHP_VERSION=8.0.23 +ARG PHP_VERSION=8.0.26 ARG USERNAME=khs1994 ARG BASE=composer diff --git a/dockerfile/php/sync/docker-image-sync.json b/dockerfile/php/sync/docker-image-sync.json index cd486ba69..097cb512d 100644 --- a/dockerfile/php/sync/docker-image-sync.json +++ b/dockerfile/php/sync/docker-image-sync.json @@ -1,78 +1,57 @@ [ { - "source": "php:8.2.0-cli-alpine" + "source": "php:8.2.3-cli-alpine" }, { - "source": "php:8.2.0-fpm-alpine" + "source": "php:8.2.3-fpm-alpine" }, { - "source": "php:8.2.0-unit-alpine" + "source": "php:8.2.3-unit-alpine" }, { - "source": "php:8.2.0-composer-alpine" + "source": "php:8.2.3-composer-alpine" }, { - "source": "php:8.2.0-swoole-alpine" + "source": "php:8.2.3-swoole-alpine" }, { - "source": "php:8.2.0-s6-alpine" + "source": "php:8.2.3-s6-alpine" }, { - "source": "php:8.1.9-cli-alpine" + "source": "php:8.1.12-cli-alpine" }, { - "source": "php:8.1.9-fpm-alpine" + "source": "php:8.1.12-fpm-alpine" }, { - "source": "php:8.1.9-unit-alpine" + "source": "php:8.1.12-unit-alpine" }, { - "source": "php:8.1.9-composer-alpine" + "source": "php:8.1.12-composer-alpine" }, { - "source": "php:8.1.9-swoole-alpine" + "source": "php:8.1.12-swoole-alpine" }, { - "source": "php:8.1.9-s6-alpine" + "source": "php:8.1.12-s6-alpine" }, { - "source": "php:8.0.23-cli-alpine" + "source": "php:8.0.26-cli-alpine" }, { - "source": "php:8.0.23-fpm-alpine" + "source": "php:8.0.26-fpm-alpine" }, { - "source": "php:8.0.23-unit-alpine" + "source": "php:8.0.26-unit-alpine" }, { - "source": "php:8.0.23-composer-alpine" + "source": "php:8.0.26-composer-alpine" }, { - "source": "php:8.0.23-swoole-alpine" + "source": "php:8.0.26-swoole-alpine" }, { - "source": "php:8.0.23-s6-alpine" - }, - { - "source": "php:7.4.32-cli-alpine" - }, - { - "source": "php:7.4.32-fpm-alpine" - }, - { - "source": "php:7.4.32-unit-alpine" - }, - { - "source": "php:7.4.32-composer-alpine" - }, - { - "source": "php:7.4.32-swoole-alpine" - }, - { - "source": "php:7.4.32-supervisord-alpine" - }, - { - "source": "php:7.4.32-s6-alpine" + "source": "php:8.0.26-s6-alpine" }, { "source": "php:nightly-cli-alpine" diff --git a/dockerfile/php/sync/manifest.txt b/dockerfile/php/sync/manifest.txt index b994b9ec8..cdf021e9d 100644 --- a/dockerfile/php/sync/manifest.txt +++ b/dockerfile/php/sync/manifest.txt @@ -1,22 +1,28 @@ -8.1.9-cli-alpine -8.1.9-fpm-alpine -8.1.9-unit-alpine -8.1.9-composer-alpine -8.1.9-swoole-alpine -8.1.9-s6-alpine -8.0.23-cli-alpine -8.0.23-fpm-alpine -8.0.23-unit-alpine -8.0.23-composer-alpine -8.0.23-swoole-alpine -8.0.23-s6-alpine -7.4.32-cli-alpine -7.4.32-fpm-alpine -7.4.32-unit-alpine -7.4.32-composer-alpine -7.4.32-swoole-alpine -7.4.32-supervisord-alpine -7.4.32-s6-alpine +8.2.3-cli-alpine +8.2.3-fpm-alpine +8.2.3-unit-alpine +8.2.3-composer-alpine +8.2.3-swoole-alpine +8.2.3-s6-alpine +8.1.12-cli-alpine +8.1.12-fpm-alpine +8.1.12-unit-alpine +8.1.12-composer-alpine +8.1.12-swoole-alpine +8.1.12-s6-alpine +8.0.26-cli-alpine +8.0.26-fpm-alpine +8.0.26-unit-alpine +8.0.26-composer-alpine +8.0.26-swoole-alpine +8.0.26-s6-alpine +7.4.33-cli-alpine +7.4.33-fpm-alpine +7.4.33-unit-alpine +7.4.33-composer-alpine +7.4.33-swoole-alpine +7.4.33-supervisord-alpine +7.4.33-s6-alpine 7.3.33-cli-alpine 7.3.33-fpm-alpine 7.3.33-unit-alpine diff --git a/dockerfile/s6/.github/workflows/ci.yaml b/dockerfile/s6/.github/workflows/ci.yaml index 15252dd02..9f37d23b2 100644 --- a/dockerfile/s6/.github/workflows/ci.yaml +++ b/dockerfile/s6/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ jobs: set -x docker buildx build \ -t khs1994/s6 \ - -t khs1994/s6:3.1.1.2 \ + -t khs1994/s6:3.1.4.2 \ -t khs1994/s6:3 \ --platform=linux/arm64,linux/arm/v7,linux/amd64 \ --push \ diff --git a/dockerfile/s6/Dockerfile b/dockerfile/s6/Dockerfile index cae32b08f..2bcd09d2e 100644 --- a/dockerfile/s6/Dockerfile +++ b/dockerfile/s6/Dockerfile @@ -1,6 +1,6 @@ FROM alpine as downloader -ARG S6_VERSION=3.1.1.2 +ARG S6_VERSION=3.1.4.2 ARG TARGETARCH diff --git a/dockerfile/s6/README.md b/dockerfile/s6/README.md index d7d35a2ba..ffb9c02d7 100644 --- a/dockerfile/s6/README.md +++ b/dockerfile/s6/README.md @@ -7,7 +7,7 @@ FROM --platform=$TARGETPLATFORM alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ # && apt-get update && apt-get install -y xz-utils && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / diff --git a/dockerfile/s6/tests/Dockerfile.alpine b/dockerfile/s6/tests/Dockerfile.alpine index 482c97695..2616e73c7 100644 --- a/dockerfile/s6/tests/Dockerfile.alpine +++ b/dockerfile/s6/tests/Dockerfile.alpine @@ -2,7 +2,7 @@ FROM --platform=$TARGETPLATFORM alpine -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ && tar -xvf /tmp/s6/s6-overlay.tar.xz -C / \ diff --git a/dockerfile/s6/tests/Dockerfile.centos b/dockerfile/s6/tests/Dockerfile.centos index 87e2f18cd..221d44903 100644 --- a/dockerfile/s6/tests/Dockerfile.centos +++ b/dockerfile/s6/tests/Dockerfile.centos @@ -4,7 +4,7 @@ ARG TAG=8 FROM --platform=$TARGETPLATFORM centos:${TAG} -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ && tar -xvf /tmp/s6/s6-overlay.tar.xz -C / \ diff --git a/dockerfile/s6/tests/Dockerfile.debian b/dockerfile/s6/tests/Dockerfile.debian index 1102715e9..e5bc80094 100644 --- a/dockerfile/s6/tests/Dockerfile.debian +++ b/dockerfile/s6/tests/Dockerfile.debian @@ -2,7 +2,7 @@ FROM --platform=$TARGETPLATFORM debian -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ && apt-get update && apt-get install -y xz-utils \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ diff --git a/dockerfile/s6/tests/Dockerfile.ubuntu b/dockerfile/s6/tests/Dockerfile.ubuntu index 59ce879c8..a2c4ccfe9 100644 --- a/dockerfile/s6/tests/Dockerfile.ubuntu +++ b/dockerfile/s6/tests/Dockerfile.ubuntu @@ -2,7 +2,7 @@ FROM --platform=$TARGETPLATFORM ubuntu -RUN --mount=type=bind,from=khs1994/s6:3.1.1.2,source=/,target=/tmp/s6 \ +RUN --mount=type=bind,from=khs1994/s6:3.1.4.2,source=/,target=/tmp/s6 \ set -x \ && apt-get update && apt-get install -y xz-utils \ && tar -xvf /tmp/s6/s6-overlay-noarch.tar.xz -C / \ diff --git a/dockerfile/sync/docker-image-sync-by-docker.json b/dockerfile/sync/docker-image-sync-by-docker.json index e5eebd32c..f8d7e4e95 100644 --- a/dockerfile/sync/docker-image-sync-by-docker.json +++ b/dockerfile/sync/docker-image-sync-by-docker.json @@ -1,7 +1,7 @@ [ { - "source": "k8s.gcr.io/coredns/coredns:v1.9.3", - "dest": "gcr-mirror/coredns:v1.9.3" + "source": "registry.k8s.io/coredns/coredns:v1.10.1", + "dest": "gcr-mirror/coredns:v1.10.1" }, { "source": "gcr.io/tekton-releases/github.com/tektoncd/dashboard/cmd/dashboard@sha256:e72593477e8cb09b718b9b0b38731de5b4cb7ef0c04712f7b97f51be5c5e06c7", @@ -68,22 +68,31 @@ "dest": "tektoncd-triggers-eventlistenersink:v0.9.0@sha256:3d9cd3788c03ea6f9c85980d3b70ded295766f222e5d30fc1790249e88a10880" }, { - "source": "mcr.microsoft.com/powershell:preview-alpine-3.12", - "dest": "powershell:preview-alpine-3.12", + "source": "mcr.microsoft.com/powershell:preview-7.4-alpine-3.17", + "dest": "powershell:preview-7.4-alpine-3.17", "registry": "mcr.microsoft.com", "image": "powershell", - "ref": "preview-alpine-3.12" + "ref": "preview-7.4-alpine-3.17", + "$comment": "https://hub.docker.com/_/microsoft-powershell" }, { - "source": "registry.k8s.io/ingress-nginx/controller:v1.3.0@sha256:d1707ca76d3b044ab8a28277a2466a02100ee9f58a86af1535a3edf9323ea1b5", - "dest": "nginx-ingress-controller:v1.3.0@sha256:d1707ca76d3b044ab8a28277a2466a02100ee9f58a86af1535a3edf9323ea1b5" + "source": "mcr.microsoft.com/powershell:preview-alpine-3.17", + "dest": "powershell:preview-alpine-3.17", + "registry": "mcr.microsoft.com", + "image": "powershell", + "ref": "preview-alpine-3.17", + "$comment": "https://hub.docker.com/_/microsoft-powershell" + }, + { + "source": "registry.k8s.io/ingress-nginx/controller:v1.7.0@sha256:7612338342a1e7b8090bef78f2a04fffcadd548ccaabe8a47bf7758ff549a5f7", + "dest": "nginx-ingress-controller:v1.7.0@sha256:7612338342a1e7b8090bef78f2a04fffcadd548ccaabe8a47bf7758ff549a5f7" }, { - "source": "k8s.gcr.io/ingress-nginx/kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660", - "dest": "nginx-ingress-kube-webhook-certgen:v1.1.1@sha256:64d8c73dca984af206adf9d6d7e46aa550362b1d7a01f3a0a91b20cc67868660" + "source": "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f", + "dest": "nginx-ingress-kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f" }, { - "source": "k8s.gcr.io/metrics-server/metrics-server:v0.6.0", + "source": "registry.k8s.io/metrics-server/metrics-server:v0.6.0", "dest": "gcr-mirror/metrics-server:v0.6.0" }, { @@ -95,8 +104,8 @@ "dest": "gcr-mirror/git-sync:v3.1.6" }, { - "source": "quay.io/coreos/etcd:v3.5.4", - "dest": "quay-mirror/etcd:v3.5.4" + "source": "quay.io/coreos/etcd:v3.5.8", + "dest": "quay-mirror/etcd:v3.5.8" }, { "source": "quay.io/coreos/flannel:v0.12.0-amd64", @@ -125,53 +134,53 @@ ] }, { - "source": "k8s.gcr.io/kube-proxy:v1.19.7", - "dest": "gcr-mirror/kube-proxy:v1.19.7", - "registry": "k8s.gcr.io", + "source": "registry.k8s.io/kube-proxy:v1.27.0", + "dest": "gcr-mirror/kube-proxy:v1.27.0", + "registry": "registry.k8s.io", "image": "kube-proxy", - "ref": "v1.19.7" + "ref": "v1.27.0" }, { - "source": "k8s.gcr.io/kube-controller-manager:v1.19.7", - "dest": "gcr-mirror/kube-controller-manager:v1.19.7", - "registry": "k8s.gcr.io", + "source": "registry.k8s.io/kube-controller-manager:v1.27.0", + "dest": "gcr-mirror/kube-controller-manager:v1.27.0", + "registry": "registry.k8s.io", "image": "kube-controller-manager", - "ref": "v1.19.7" + "ref": "v1.27.0" }, { - "source": "k8s.gcr.io/kube-apiserver:v1.19.7", - "dest": "gcr-mirror/kube-apiserver:v1.19.7", - "registry": "k8s.gcr.io", + "source": "registry.k8s.io/kube-apiserver:v1.27.0", + "dest": "gcr-mirror/kube-apiserver:v1.27.0", + "registry": "registry.k8s.io", "image": "kube-apiserver", - "ref": "v1.19.7" + "ref": "v1.27.0" }, { - "source": "k8s.gcr.io/kube-scheduler:v1.19.7", - "dest": "gcr-mirror/kube-scheduler:v1.19.7", - "registry": "k8s.gcr.io", + "source": "registry.k8s.io/kube-scheduler:v1.27.0", + "dest": "gcr-mirror/kube-scheduler:v1.27.0", + "registry": "registry.k8s.io", "image": "kube-scheduler", - "ref": "v1.19.7" + "ref": "v1.27.0" }, { - "source": "k8s.gcr.io/etcd:3.4.16-0", + "source": "registry.k8s.io/etcd:3.4.16-0", "dest": "gcr-mirror/etcd:3.4.16-0", - "registry": "k8s.gcr.io", + "registry": "registry.k8s.io", "image": "etcd", "ref": "3.4.16-0" }, { - "source": "k8s.gcr.io/pause:3.7", - "dest": "gcr-mirror/pause:3.7", - "registry": "k8s.gcr.io", + "source": "registry.k8s.io/pause:3.8", + "dest": "gcr-mirror/pause:3.8", + "registry": "registry.k8s.io", "image": "pause", - "ref": "3.6" + "ref": "3.8" }, { - "source": "k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.3.0", + "source": "registry.k8s.io/kube-state-metrics/kube-state-metrics:v2.3.0", "dest": "gcr-mirror/kube-state-metrics:v2.3.0" }, { - "source": "k8s.gcr.io/prometheus-adapter/prometheus-adapter:v0.9.1", + "source": "registry.k8s.io/prometheus-adapter/prometheus-adapter:v0.9.1", "dest": "gcr-mirror/prometheus-adapter:v0.9.1" } ] diff --git a/dockerfile/sync/docker-image-sync-ghcr.json b/dockerfile/sync/docker-image-sync-ghcr.json index 2356733a1..ad15ac628 100644 --- a/dockerfile/sync/docker-image-sync-ghcr.json +++ b/dockerfile/sync/docker-image-sync-ghcr.json @@ -50,5 +50,9 @@ { "source": "docker/dockerfile-upstream:master-labs", "dest": "docker-dockerfile-upstream:master-labs" + }, + { + "source": "quay.io/fluentd_elasticsearch/elasticsearch:v7.16.2", + "dest": "elasticsearch:v7.16.2" } ] diff --git a/dockerfile/sync/docker-image-sync.json b/dockerfile/sync/docker-image-sync.json index 848cdd470..227b20543 100644 --- a/dockerfile/sync/docker-image-sync.json +++ b/dockerfile/sync/docker-image-sync.json @@ -68,8 +68,8 @@ "dest": "library-mirror/mysql:latest" }, { - "source": "library/mysql:8.0.30", - "dest": "library-mirror/mysql:8.0.30" + "source": "library/mysql:8.0.33", + "dest": "library-mirror/mysql:8.0.33" }, { "source": "library/mysql:5.7.33", diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 824907cc6..f9313df2f 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -19,7 +19,7 @@ module.exports = { }, { text: '捐赠', - link: 'https://github.com/khs1994/donate' + link: 'https://zan.khs1994.com' }, { text: '腾讯云服务器限时秒杀', diff --git a/docs/cli.md b/docs/cli.md index 7db7db36d..8451f903b 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -33,13 +33,13 @@ export PATH=$LNMP_PATH:$LNMP_PATH/bin:$PATH #### Linux ```bash -$ sudo ln -s $LNMP_PATH/cli/completion/bash/lnmp-docker /etc/bash_completion.d/lnmp-docker +$ sudo ln -s $LNMP_PATH/scripts/cli/completion/bash/lnmp-docker /etc/bash_completion.d/lnmp-docker ``` #### macOS ```bash -$ sudo ln -s $LNMP_PATH/cli/completion/bash/lnmp-docker /usr/local/etc/bash_completion.d/lnmp-docker +$ sudo ln -s $LNMP_PATH/scripts/cli/completion/bash/lnmp-docker /usr/local/etc/bash_completion.d/lnmp-docker ``` ### 2. fish @@ -47,7 +47,7 @@ $ sudo ln -s $LNMP_PATH/cli/completion/bash/lnmp-docker /usr/local/etc/bash_comp ```bash $ set -Ux LNMP_PATH /data/lnmp -$ ln -s $LNMP_PATH/cli/completion/fish/lnmp-docker.fish ~/.config/fish/completions/ +$ ln -s $LNMP_PATH/scripts/cli/completion/fish/lnmp-docker.fish ~/.config/fish/completions/ ``` > 删除环境变量 `$ set -Ue LNMP_PATH` diff --git a/docs/composer/README.md b/docs/composer/README.md index 2e58b8d23..757bcad57 100644 --- a/docs/composer/README.md +++ b/docs/composer/README.md @@ -16,17 +16,24 @@ $ composer install \ # https://developer.aliyun.com/composer $ composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ -$ composer config -g repos.packagist composer https://repo.huaweicloud.com/repository/php/ - # https://mirrors.cloud.tencent.com/help/composer.html $ composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/ ``` +**全球镜像** + +```bash +$ composer config -g repos.packagist composer https://packagist.pages.dev +``` + **过时的镜像(无法使用)** -* https://packagist.mirrors.sjtug.sjtu.edu.cn -* https://packagist.phpcomposer.com -* https://php.cnpkg.org +* ~~Asia, China mirrors.huaweicloud.com/repository/php~~ +* Asia, China developer.aliyun.com/composer +* ~~Asia, China php.cnpkg.org~~ +* ~~Asia, China packagist.phpcomposer.com~~ +* ~~Asia, China packagist.mirrors.sjtug.sjtu.edu.cn~~ +* Asia, China mirrors.cloud.tencent.com/help/composer.html **取消配置** diff --git a/docs/custom.md b/docs/custom.md index 96bdab48a..5b4b68725 100644 --- a/docs/custom.md +++ b/docs/custom.md @@ -37,7 +37,7 @@ services: php8: # 想修改哪个配置在这里重写即可,例如想使用自己的 PHP 镜像或国内镜像,那么增加 `image` 指令即可 - image: ccr.ccs.tencentyun.com/khs1994/php:${LNMP_PHP_VERSION:-8.1.9}-fpm-alpine + image: ccr.ccs.tencentyun.com/khs1994/php:${LNMP_PHP_VERSION:-8.2.3}-fpm-alpine ``` 你也可以加上 `build` 字段,先构建镜像再启动 @@ -48,7 +48,7 @@ services: services: php8: - image: ccr.ccs.tencentyun.com/khs1994/php:${LNMP_PHP_VERSION:-8.1.9}-fpm-alpine + image: ccr.ccs.tencentyun.com/khs1994/php:${LNMP_PHP_VERSION:-8.2.3}-fpm-alpine # 增加 build 字段 build: context: ./dockerfile/php/ diff --git a/docs/development.md b/docs/development.md index 9636dba27..e5a8421f6 100644 --- a/docs/development.md +++ b/docs/development.md @@ -38,16 +38,10 @@ └── lnmp # khs1994-docker/lnmp ``` -我们也可以将项目放置于 **WSL2** 中,例如我们想要将项目文件放置于 **WSL2** `Ubuntu` 中的 `/app/*` 目录,那么请在 `.env` 和 `.env.ps1` 中进行如下设置 +我们也可以将项目放置于 **WSL2** 中,例如我们想要将项目文件放置于 **WSL2** `Ubuntu` 中的 `/app/*` 目录,那么请在 `.env` 中进行如下设置 ```bash -# .env -APP_ROOT=/app -``` - -```powershell -# .env.ps1 -$WSL2_DIST="ubuntu" +APP_ROOT=\\wsl$\Ubuntu\app ``` ## 如何正确的自定义配置文件 diff --git a/docs/laravel.md b/docs/laravel.md index acb30ad28..80349e125 100644 --- a/docs/laravel.md +++ b/docs/laravel.md @@ -7,7 +7,7 @@ $ cd app $ lnmp-laravel new laravel -# 上面的命令会安装 Laravel 最新的主线版本(9.x),如果你要安装特定版本可以加上 **版本号** +# 上面的命令会安装 Laravel 最新的主线版本(10.x),如果你要安装特定版本可以加上 **版本号** # $ lnmp-laravel new FOLDER VERSION # $ lnmp-laravel new laravel5.5 5.5 @@ -72,135 +72,126 @@ _ide_helper.php > 项目放置于 WSL2 也可以使用 PHPStorm,请参考 https://github.com/khs1994-docker/php-demo -**在 Docker 设置中启用 WSL2 集成** +**1. 在 Docker 设置中启用 WSL2 集成** `Resources` -> `WSL INTEGRATION`-> `Enable integration with additional distros:` -> `开启你所使用的 WSL2 (例如:Ubuntu)` -**安装 vsCode 扩展** +**2. 安装 vsCode 扩展** ```bash $ code --install-extension ms-vscode-remote.remote-wsl ``` -**在 `.env` `.env.ps1` 中修改变量** +**3. 在 `.env` 中修改变量** ```bash -# .env -APP_ROOT=/app +APP_ROOT=\\wsl$\ubuntu\app ``` +**4. 将 lnmp/bin 目录加入到 WSL2 PATH** + ```powershell -# .env.ps1 -# 请将 Ubuntu 换成你使用的 WSL2 名称 -$WSL2_DIST="Ubuntu" +# 在 Windows 终端执行 +$ cd ~/lnmp/bin + +$ $env:WSLENV="LNMP_BIN_WIN_PATH/p" +$ $env:LNMP_BIN_WIN_PATH=$PWD + +$ wsl -d -- sh -c 'echo $LNMP_BIN_WIN_PATH' +# 将结果追加到 WSL2 中的 PATH 环境变量中 ``` **以上步骤仅需执行一次,后续开发从以下步骤开始** -**启动 LNMP** +**5. 启动 LNMP** ```bash $ ./lnmp-docker up ``` -**打开 vsCode** +**6. 安装 laravel 到 laravel 文件夹** ```powershell -# 打开 /app -# 适用于首次使用,/app 暂无子目录,需要到 /app 中新建项目目录 $ lnmp-docker code - -# /app 有子目录之后可以直接打开 /app 子目录(e.g. laravel) -# $ lnmp-docker code laravel -# 上述命令将打开 /app/laravel ``` -在 vsCode 中点击菜单栏 `查看` -> `终端` +执行上述命令会出现 vsCode 窗口 -在出现的终端中执行命令,本例以添加 `laravel/jetstream` 组件为例: +在 vsCode 中点击菜单栏 `查看` -> `终端`,在出现的终端中执行命令 ->请提前将本项目的 `bin` 目录加入到 PATH,具体说明请查看附录 +```bash +# 安装 laravel 到 laravel 文件夹 +# 安装 laravel 10 使用阿里云镜像会出现错误,暂时切换到其他镜像 +$ lnmp-composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/ +# 切换回阿里云镜像 +# lnmp-composer config -g repos.packagist composer https://mirrors.aliyun.com/composer/ +$ lnmp-laravel new laravel +# 文件可能因为权限问题无法编辑,更改权限 +$ sudo chown -R 1000:1000 /app +$ sudo chmod -R 777 /app/laravel/storage/app +$ sudo chmod -R 777 /app/laravel/storage/logs +$ sudo chmod -R 777 /app/laravel/storage/framework +``` -```powershell -# 你也可以在 Windows 终端执行命令 +关闭 vsCode + +**8. 日常开发步骤** -$ $WSL2_DIST=ubuntu -$ cd \\wsl$\$WSL2_DIST\app +```powershell +$ lnmp-docker code laravel ``` -```bash -# 安装 laravel 到 laravel 文件夹 -# $ lnmp-laravel new laravel -# 文件可能因为权限问题无法编辑,自行更改权限 -# $ $WSL2_DIST=ubuntu -# $ wsl -d $WSL2_DIST -u root -- chown -R 1000:1000 /app -# $ wsl -d $WSL2_DIST -u root -- chmod -R 777 /app/laravel/storage/app -# $ wsl -d $WSL2_DIST -u root -- chmod -R 777 /app/laravel/storage/logs -# $ wsl -d $WSL2_DIST -u root -- chmod -R 777 /app/laravel/storage/framework -$ cd laravel +执行上述命令会出现 vsCode 窗口 + +在 vsCode 中点击菜单栏 `查看` -> `终端`,在出现的终端中执行命令 + +本例以添加 `laravel/jetstream` 组件为例: +```bash $ lnmp-composer require laravel/jetstream $ lnmp-php artisan jetstream:install inertia $ lnmp-npm install -$ lnmp-npm run dev - -# 打开 http://127.0.0.1/register 查看页面 -``` - -#### 附录:查看本项目的 `bin` 目录在 WSL2 中的路径 +$ lnmp-npm run build -在 Windows 终端中执行 +$ lnmp-php artisan migrate -```powershell -$ cd ~/lnmp/bin - -$ $env:WSLENV="LNMP_BIN_WIN_PATH/p" -$ $env:LNMP_BIN_WIN_PATH=$PWD - -$ wsl -d -- sh -c 'echo $LNMP_BIN_WIN_PATH' -# 将结果追加到 WSL2 中的 PATH 环境变量中 +# 打开 http://127.0.0.1/register 查看页面 ``` ### 第二种方案是使用 **vsCode remote container** 容器远程开发 -**在 Docker 设置中启用 WSL2 集成** +**1. 在 Docker 设置中启用 WSL2 集成** `Resources` -> `WSL INTEGRATION`-> `Enable integration with additional distros:` -> `开启你所使用的 WSL2 (例如:Ubuntu)` -**安装 vsCode 扩展** +**2. 安装 vsCode 扩展** ```bash $ code --install-extension ms-vscode-remote.remote-containers ``` -**在 `.env` `.env.ps1` 中修改变量** +**3. 在 `.env` 中修改变量** ```bash # .env -APP_ROOT=/app +APP_ROOT=\\wsl$\ubuntu\app # 增加 vscode-remote-container-workspace 服务 LNMP_SERVICES="nginx mysql php8 redis vscode-remote-container-workspace" ``` -```powershell -# .env.ps1 -# 请将 Ubuntu 换成你使用的 WSL2 名称 -$WSL2_DIST="ubuntu" -``` - **以上步骤仅需执行一次,后续开发从以下步骤开始** -**启动 LNMP** +**4. 启动 LNMP** ```bash $ ./lnmp-docker up ``` -**打开 vsCode** +**5. 打开 vsCode** 左下角 `打开远程窗口` -> `Remote-Containers: Attach to Running Container...` -> 选择 `lnmp_vscode-remote-container-workspace_1` 容器 -> 出现新窗口 -> 左面选择打开文件夹 -> 输入 `/app` @@ -211,7 +202,7 @@ $ ./lnmp-docker up ```bash # 安装 laravel 到 laravel 文件夹 # $ composer create-project --prefer-dist laravel/laravel laravel -# 文件可能因为权限问题无法编辑,自行更改权限 +# 文件可能因为权限问题无法编辑,更改权限 # $ $WSL2_DIST=ubuntu # $ wsl -d $WSL2_DIST -u root -- chown -R 1000:1000 /app # $ wsl -d $WSL2_DIST -u root -- chmod -R 777 /app/laravel/storage/app @@ -262,7 +253,7 @@ $ lnmp-docker php8-cli php /app/laravel/artisan schedule:run ## 运行 Laravel horizon -* https://laravel.com/docs/9.x/horizon +* https://laravel.com/docs/10.x/horizon ```bash $ lnmp-composer require laravel/horizon diff --git a/docs/mirror.md b/docs/mirror.md index c066325f7..5346c4662 100644 --- a/docs/mirror.md +++ b/docs/mirror.md @@ -6,7 +6,6 @@ * `https://hub-mirror.c.163.com` * `https://mirror.baidubce.com` -* `https://docker.mirrors.ustc.edu.cn` ## k8s.gcr.io diff --git a/docs/php_eol.md b/docs/php_eol.md index f51a39000..8fdd91551 100644 --- a/docs/php_eol.md +++ b/docs/php_eol.md @@ -11,7 +11,7 @@ services: php5: << : *common restart: ${LNMP_RESTART:-always} - env_file: ./cli/timezone.env + env_file: ./scripts/cli/timezone.env # build: # context: ./dockerfile/php/ # 5.x 只支持 5.6.37 -- 5.6.40 其他版本请自行构建 diff --git a/docs/systemd.md b/docs/systemd.md index 600141dd4..7c91462ef 100644 --- a/docs/systemd.md +++ b/docs/systemd.md @@ -1,13 +1,13 @@ # systemd -systemd 文件位于 `cli/systemd/*` +systemd 文件位于 `scripts/cli/systemd/*` 适用于 `Linux x86_64` 开发环境。 >务必熟悉 `systemd` 之后再执行此项操作。 ```bash -$ sudo cp $LNMP_PATH/cli/systemd/lnmp-docker.service /etc/systemd/system/ +$ sudo cp $LNMP_PATH/scripts/cli/systemd/lnmp-docker.service /etc/systemd/system/ $ sudo vi /etc/systemd/system/lnmp-docker.service @@ -27,7 +27,7 @@ $ sudo journalctl -u lnmp-docker ## 每周清理日志 ```bash -$ sudo cp -a $LNMP_PATH/cli/systemd/*-cleanup /etc/systemd/system/ +$ sudo cp -a $LNMP_PATH/scripts/cli/systemd/*-cleanup /etc/systemd/system/ $ sudo vi /etc/systemd/system/lnmp-docker-cleanup.service diff --git a/drone/.env.example b/drone/.env.example index d144396e0..fd4aca8de 100644 --- a/drone/.env.example +++ b/drone/.env.example @@ -149,7 +149,7 @@ CI_DB_TYPE= CI_DRONE_VERSION=2.16.0 CI_NGINX_VERSION=1.23.3 CI_REDIS_VERSION=7.0.0 -CI_MYSQL_VERSION=8.0.30 +CI_MYSQL_VERSION=8.0.33 DRONE_GITHUB_CLIENT_ID_TEST= DRONE_GITHUB_CLIENT_SECRET_TEST= diff --git a/drone/docker-ci.yml b/drone/docker-ci.yml index cb2ee7d55..724d3188c 100644 --- a/drone/docker-ci.yml +++ b/drone/docker-ci.yml @@ -74,7 +74,7 @@ services: mysql: << : *common - image: mysql:${CI_MYSQL_VERSION:-8.0.30} + image: mysql:${CI_MYSQL_VERSION:-8.0.33} env_file: secrets/mysql.env volumes: - mysql-data:/var/lib/mysql:rw diff --git a/drone/kubernetes/drone-runner/docker/kustomization.yaml b/drone/kubernetes/drone-runner/docker/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/drone-runner/docker/kustomization.yaml +++ b/drone/kubernetes/drone-runner/docker/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/drone-runner/kubernetes/kustomization.yaml b/drone/kubernetes/drone-runner/kubernetes/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/drone-runner/kubernetes/kustomization.yaml +++ b/drone/kubernetes/drone-runner/kubernetes/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/drone-runner/kustomization.yaml b/drone/kubernetes/drone-runner/kustomization.yaml index 222449653..2d6b1f45b 100644 --- a/drone/kubernetes/drone-runner/kustomization.yaml +++ b/drone/kubernetes/drone-runner/kustomization.yaml @@ -1,3 +1,3 @@ -bases: +resources: - docker - kubernetes diff --git a/drone/kubernetes/drone/kustomization.yaml b/drone/kubernetes/drone/kustomization.yaml index 82b9fd24d..5d2375467 100644 --- a/drone/kubernetes/drone/kustomization.yaml +++ b/drone/kubernetes/drone/kustomization.yaml @@ -1,4 +1,4 @@ -bases: +resources: - base # - ../drone-runner/docker # - ../drone-runner/kubernetes diff --git a/drone/kubernetes/drone/providers/gitea/kustomization.yaml b/drone/kubernetes/drone/providers/gitea/kustomization.yaml index e6083314f..ca77bef21 100644 --- a/drone/kubernetes/drone/providers/gitea/kustomization.yaml +++ b/drone/kubernetes/drone/providers/gitea/kustomization.yaml @@ -1,4 +1,4 @@ -bases: +resources: - ../../base patchesStrategicMerge: - gitea.yaml diff --git a/drone/kubernetes/drone/providers/github/kustomization.yaml b/drone/kubernetes/drone/providers/github/kustomization.yaml index 9ce996d6a..739e8c6df 100644 --- a/drone/kubernetes/drone/providers/github/kustomization.yaml +++ b/drone/kubernetes/drone/providers/github/kustomization.yaml @@ -1,4 +1,4 @@ -bases: +resources: - ../../base patchesStrategicMerge: - github.yaml diff --git a/drone/kubernetes/gitea/base/kustomization.yaml b/drone/kubernetes/gitea/base/kustomization.yaml index c8871f4fc..820fa383c 100644 --- a/drone/kubernetes/gitea/base/kustomization.yaml +++ b/drone/kubernetes/gitea/base/kustomization.yaml @@ -1,5 +1,4 @@ -bases: - - ../../../config/gitea resources: + - ../../../config/gitea - gitea.yaml namespace: ci diff --git a/drone/kubernetes/gitea/kustomization.yaml b/drone/kubernetes/gitea/kustomization.yaml index f191f3aae..197c7292e 100644 --- a/drone/kubernetes/gitea/kustomization.yaml +++ b/drone/kubernetes/gitea/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/gogs/base/kustomization.yaml b/drone/kubernetes/gogs/base/kustomization.yaml index 0733da081..954ed69c9 100644 --- a/drone/kubernetes/gogs/base/kustomization.yaml +++ b/drone/kubernetes/gogs/base/kustomization.yaml @@ -1,5 +1,4 @@ -bases: -- ../../../config/gogs/ resources: +- ../../../config/gogs/ - gogs.yaml namespace: ci diff --git a/drone/kubernetes/gogs/kustomization.yaml b/drone/kubernetes/gogs/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/gogs/kustomization.yaml +++ b/drone/kubernetes/gogs/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/ingress-nginx/kustomization.yaml b/drone/kubernetes/ingress-nginx/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/ingress-nginx/kustomization.yaml +++ b/drone/kubernetes/ingress-nginx/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/minio/base/kustomization.yaml b/drone/kubernetes/minio/base/kustomization.yaml index 456146974..0d2dc21f0 100644 --- a/drone/kubernetes/minio/base/kustomization.yaml +++ b/drone/kubernetes/minio/base/kustomization.yaml @@ -1,5 +1,4 @@ -bases: -- ../../../../kubernetes/deploy/minio/base resources: +- ../../../../kubernetes/deploy/minio/base - pvc.yaml namespace: ci diff --git a/drone/kubernetes/minio/kustomization.yaml b/drone/kubernetes/minio/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/minio/kustomization.yaml +++ b/drone/kubernetes/minio/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/mysql/base/kustomization.yaml b/drone/kubernetes/mysql/base/kustomization.yaml index 920cc9caa..7402a4658 100644 --- a/drone/kubernetes/mysql/base/kustomization.yaml +++ b/drone/kubernetes/mysql/base/kustomization.yaml @@ -1,6 +1,5 @@ -bases: -- ../../../../kubernetes/lnmp/mysql/overlays/production -namespace: ci resources: +- ../../../../kubernetes/lnmp/mysql/overlays/production - pv.yaml - pvc.yaml +namespace: ci diff --git a/drone/kubernetes/mysql/kustomization.yaml b/drone/kubernetes/mysql/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/mysql/kustomization.yaml +++ b/drone/kubernetes/mysql/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/drone/kubernetes/redis/base/kustomization.yaml b/drone/kubernetes/redis/base/kustomization.yaml index 6c652feae..ed4501d5d 100644 --- a/drone/kubernetes/redis/base/kustomization.yaml +++ b/drone/kubernetes/redis/base/kustomization.yaml @@ -1,6 +1,5 @@ -bases: -- ../../../../kubernetes/lnmp/redis/overlays/production -namespace: ci resources: +- ../../../../kubernetes/lnmp/redis/overlays/production - pv.yaml - pvc.yaml +namespace: ci diff --git a/drone/kubernetes/redis/kustomization.yaml b/drone/kubernetes/redis/kustomization.yaml index 3084d1a5e..36ce8fd04 100644 --- a/drone/kubernetes/redis/kustomization.yaml +++ b/drone/kubernetes/redis/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - base diff --git a/kubernetes/.env.example b/kubernetes/.env.example index 7a121919b..528450887 100644 --- a/kubernetes/.env.example +++ b/kubernetes/.env.example @@ -1,4 +1,4 @@ -KUBERNETES_VERSION=1.26.0 +KUBERNETES_VERSION=1.27.0 # KUBERNETES_VERSION= @@ -11,23 +11,23 @@ LNMP_HTTPS_PORT=443 # soft version # https://github.com/etcd-io/etcd/releases -ETCD_VERSION=3.5.4 +ETCD_VERSION=3.5.8 # https://github.com/helm/helm/releases -HELM_VERSION=3.9.4 +HELM_VERSION=3.11.3 # https://github.com/containernetworking/cni/releases # https://github.com/containernetworking/plugins/releases -CNI_VERSION=1.1.1 +CNI_VERSION=1.2.0 # https://github.com/kubernetes-sigs/cri-tools/releases -CRICTL_VERSION=1.26.0 +CRICTL_VERSION=1.27.0 NGINX_VERSION=1.23.3 # https://github.com/containerd/containerd/releases -CONTAINERD_VERSION=1.6.8 +CONTAINERD_VERSION=1.7.0 # https://github.com/containers/conmon/releases -CONMON_VERSION=2.1.3 +CONMON_VERSION=2.1.7 # https://github.com/containers/crun/releases -CRUN_VERSION=1.5 +CRUN_VERSION=1.8.4 # https://github.com/opencontainers/runc/releases -RUNC_VERSION=1.1.4 +RUNC_VERSION=1.1.7 # 如何构建该镜像请查看 ~/lnmp/windows/lnmp-windows-pm-repo/k8s/kubernetes-{server,node} # K8S_IMAGE_REGISTRY=useccr.ccs.tencentyun.com diff --git a/kubernetes/.github/workflows/setup-k8s.yaml b/kubernetes/.github/workflows/setup-k8s.yaml index 2e9440976..c520a4be3 100644 --- a/kubernetes/.github/workflows/setup-k8s.yaml +++ b/kubernetes/.github/workflows/setup-k8s.yaml @@ -39,42 +39,42 @@ jobs: # next next version # - os: ubuntu # dist: 20.04 - # CI_KUBERNETES_VERSION: 1.28.0-alpha.1 + # CI_KUBERNETES_VERSION: 1.29.0-alpha.1 # LNMP_K8S_GET: --url # GENERATE_CLI_HELP: "true" # next version - - os: ubuntu - dist: 20.04 - CI_KUBERNETES_VERSION: 1.27.0-rc.0 - LNMP_K8S_GET: --url - GENERATE_CLI_HELP: "true" + # - os: ubuntu + # dist: 20.04 + # CI_KUBERNETES_VERSION: 1.28.0-alpha.1 + # LNMP_K8S_GET: --url + # GENERATE_CLI_HELP: "true" # current stable version - os: ubuntu dist: 20.04 - CI_KUBERNETES_VERSION: 1.26.0 + CI_KUBERNETES_VERSION: 1.27.0 LNMP_K8S_LOCAL_INSTALL_OPTIONS: --crio K8S_IMAGE_NS: khs1994 K8S_IMAGE_REGISTRY: useccr.ccs.tencentyun.com UPLOAD_TO_CODING: "true" - os: ubuntu dist: 20.04 - CI_KUBERNETES_VERSION: 1.26.0 + CI_KUBERNETES_VERSION: 1.27.0 LNMP_K8S_GET: --url - # - # GENERATE_CLI_HELP: "true" - # + + GENERATE_CLI_HELP: "true" + UPLOAD_TO_CODING: "true" # ipv6 # - os: ubuntu # dist: 20.04 - # CI_KUBERNETES_VERSION: 1.26.0 + # CI_KUBERNETES_VERSION: 1.27.0 # LNMP_K8S_GET: --url # IPV6: "true" - os: ubuntu dist: 20.04 - CI_KUBERNETES_VERSION: 1.26.0 + CI_KUBERNETES_VERSION: 1.27.0 LNMP_K8S_GET: --url CNI_CALICO_EBPF: 'true' # v1.24.0+ not support docker @@ -84,17 +84,21 @@ jobs: # LNMP_K8S_LOCAL_INSTALL_OPTIONS: --docker - os: ubuntu dist: 20.04 - CI_KUBERNETES_VERSION: 1.26.0 + CI_KUBERNETES_VERSION: 1.27.0 LNMP_K8S_GET: --url K8S_ROOT: /opt/k8s-custom # old version - os: ubuntu dist: 20.04 - CI_KUBERNETES_VERSION: 1.25.6 + CI_KUBERNETES_VERSION: 1.26.4 + LNMP_K8S_GET: --url + - os: ubuntu + dist: 20.04 + CI_KUBERNETES_VERSION: 1.25.9 LNMP_K8S_GET: --url - os: ubuntu dist: 20.04 - CI_KUBERNETES_VERSION: 1.24.10 + CI_KUBERNETES_VERSION: 1.24.13 LNMP_K8S_GET: --url fail-fast: false steps: @@ -258,7 +262,7 @@ jobs: sudo systemctl cat docker - sudo systemctl cat cri-containerd@1.6 + sudo systemctl cat cri-containerd@1.7 sudo systemctl cat cri-o || true sudo cat /etc/sysconfig/crio || true @@ -274,7 +278,7 @@ jobs: sudo rm -rf /etc/crio/crio.conf.d/00-default.conf || true test -z "${LNMP_K8S_LOCAL_INSTALL_OPTIONS}" \ - && (sudo systemctl daemon-reload ; sudo systemctl start cri-containerd@1.6) || true + && (sudo systemctl daemon-reload ; sudo systemctl start cri-containerd@1.7) || true test "${LNMP_K8S_LOCAL_INSTALL_OPTIONS}" = "--docker" \ && (sudo systemctl restart docker || sudo journalctl -u docker) || true test "${LNMP_K8S_LOCAL_INSTALL_OPTIONS}" = "--crio" \ @@ -323,7 +327,7 @@ jobs: sudo journalctl -u kube-proxy sudo journalctl -u kubelet${KUBELET_SERVICE} - sudo journalctl -u cri-containerd@1.6 || true + sudo journalctl -u cri-containerd@1.7 || true sudo journalctl -u cri-o || true kubectl get csr @@ -512,7 +516,7 @@ jobs: export PATH=${K8S_ROOT:-/opt/k8s}/bin:$PATH BASE_BRANCH=master # BASE_BRANCH=v1.25.0-config - if ! [ $CI_KUBERNETES_VERSION = '1.26.0' -a "$GENERATE_CLI_HELP" = "true" ];then + if ! [ $CI_KUBERNETES_VERSION = '1.27.0' -a "$GENERATE_CLI_HELP" = "true" ];then exit 0 fi @@ -538,9 +542,9 @@ jobs: run: | export PATH=${K8S_ROOT:-/opt/k8s}/bin:$PATH - BASE_BRANCH=v1.27.0-alpha.3-config - # BASE_BRANCH=master - if [ $CI_KUBERNETES_VERSION != '1.27.0-rc.0' ];then + BASE_BRANCH=v1.28.0-alpha.1-config + BASE_BRANCH=master + if [ $CI_KUBERNETES_VERSION != '1.28.0-alpha.1' ];then exit 0 fi @@ -566,9 +570,9 @@ jobs: run: | export PATH=${K8S_ROOT:-/opt/k8s}/bin:$PATH - BASE_BRANCH=v1.27.0-alpha.1 + BASE_BRANCH=v1.28.0-alpha.1 # BASE_BRANCH=master - if [ $CI_KUBERNETES_VERSION != '1.28.0-alpha.1' ];then + if [ $CI_KUBERNETES_VERSION != '1.29.0-alpha.1' ];then exit 0 fi diff --git a/kubernetes/CHANGELOG.md b/kubernetes/CHANGELOG.md index a60cc9607..6e974e3d1 100644 --- a/kubernetes/CHANGELOG.md +++ b/kubernetes/CHANGELOG.md @@ -4,6 +4,18 @@ * Kubernetes `1.22.0` +## v1.29.0 + +* KubeSchedulerConfiguration v1beta3 is deprecated in v1.26, will be removed in v1.29 + +## v1.27.0 + +* kubelet[6992]: E0325 01:13:41.783571 6992 run.go:74] "command failed" err="failed to parse kubelet flag: unknown flag: --container-runtime" + +## v1.26.0 + +* KubeSchedulerConfiguration v1beta3 is deprecated in v1.26, will be removed in v1.29 + ## v1.24.0 * 不支持 `Docker` Docker runtime support using dockshim in the kubelet is now completely removed in 1.24. diff --git a/kubernetes/RELEASE.md b/kubernetes/RELEASE.md index 84f8944d8..54d530725 100644 --- a/kubernetes/RELEASE.md +++ b/kubernetes/RELEASE.md @@ -7,30 +7,6 @@ * 手动触发 [GitHub Action](https://github.com/khs1994-docker/lnmp/actions?query=workflow%3Alwpm-dist-k8s-file) 构建 lwpm k8s 指定版本的镜像 * 同步 lwpm k8s 包到国内镜像,coding.net(由上一步骤的 GitHub Action 自动触发) -## 打包 containerd arm64 - -在 https://github.com/containerd/containerd/actions 下载 - -将 `linux_arm64.zip` 放到 `~/lnmp/kubernetes` - -```powershell -$ ./lnmp-k8s.ps1 dist-containerd-arm64 -``` - -将 `containerd-nightly-linux-arm64.tar.gz` `containerd-nightly-linux-arm64.tar.gz.sha256sum` 上传到 https://github.com/docker-practice/containerd/releases/tag/nightly - -**.tar.gz 文件结构** - -```bash -containerd-nightly-linux-arm64 -└── bin - ├── containerd - ├── containerd-shim - ├── containerd-shim-runc-v1 - ├── containerd-shim-runc-v2 - └── ctr -``` - ## 国外镜像 默认使用国内镜像,请在 `lnmp-k8s` 中判断运行环境,若为国外环境,执行 `sed` 替换为国外镜像 diff --git a/kubernetes/addons/README.md b/kubernetes/addons/README.md index 2512d6068..a203a9ecf 100644 --- a/kubernetes/addons/README.md +++ b/kubernetes/addons/README.md @@ -4,7 +4,7 @@ * metrics-server `0.6.0` -* CoreDNS `1.9.3` +* CoreDNS `1.10.1` * Dashboard `2.6.0` @@ -12,13 +12,13 @@ ## ingress -* ingress-nginx `1.3.0` +* ingress-nginx `1.7.0` * ingress-kong `2.5.0` ## CNI -* [calico](https://projectcalico.docs.tigera.io/getting-started/kubernetes/self-managed-onprem/) `3.24` +* [calico](https://projectcalico.docs.tigera.io/getting-started/kubernetes/self-managed-onprem/) `3.25.1` ## CI/CD @@ -27,5 +27,5 @@ ## 目录结构 * `base` -* `cn` 将 `base` 中的 `image` (例如 `k8s.gcr.io`)替换为国内地址 +* `cn` 将 `base` 中的 `image` (例如 `registry.k8s.io`)替换为国内地址 * `kustomization.yaml` 指向 `base` diff --git a/kubernetes/addons/cni/README.md b/kubernetes/addons/cni/README.md index eb6d4ca0d..4642616e8 100644 --- a/kubernetes/addons/cni/README.md +++ b/kubernetes/addons/cni/README.md @@ -1,4 +1,4 @@ -* https://projectcalico.docs.tigera.io/manifests/calico.yaml +* https://raw.githubusercontent.com/projectcalico/calico/v3.25.1/manifests/calico.yaml * https://projectcalico.docs.tigera.io/manifests/csi-driver.yaml ## 环境变量 diff --git a/kubernetes/addons/cni/calico-coreos/kustomization.yaml b/kubernetes/addons/cni/calico-coreos/kustomization.yaml index 5364362fd..01f510ee1 100644 --- a/kubernetes/addons/cni/calico-coreos/kustomization.yaml +++ b/kubernetes/addons/cni/calico-coreos/kustomization.yaml @@ -1,6 +1,6 @@ -bases: +resources: - ../calico-custom -patchesJson6902: +patches: - target: group: apps version: v1 diff --git a/kubernetes/addons/cni/calico-custom/kustomization.yaml b/kubernetes/addons/cni/calico-custom/kustomization.yaml index adf1dabb8..ea26f4b5a 100644 --- a/kubernetes/addons/cni/calico-custom/kustomization.yaml +++ b/kubernetes/addons/cni/calico-custom/kustomization.yaml @@ -1,6 +1,6 @@ -bases: - - ../calico + resources: +- ../calico - configMap.yaml vars: - name: CALICO_IPV6POOL_CIDR @@ -10,7 +10,7 @@ vars: kind: ConfigMap fieldref: fieldpath: data.IPV6podCIDR -patchesJson6902: +patches: - target: group: apps version: v1 diff --git a/kubernetes/addons/cni/calico-eBPF-nft/kustomization.yaml b/kubernetes/addons/cni/calico-eBPF-nft/kustomization.yaml index 8d0d5b550..c916d30cd 100644 --- a/kubernetes/addons/cni/calico-eBPF-nft/kustomization.yaml +++ b/kubernetes/addons/cni/calico-eBPF-nft/kustomization.yaml @@ -1,6 +1,6 @@ -bases: +resources: - ../calico-eBPF -patchesJson6902: +patches: - target: group: apps version: v1 diff --git a/kubernetes/addons/cni/calico-eBPF/kustomization.yaml b/kubernetes/addons/cni/calico-eBPF/kustomization.yaml index 56a925d43..c88e5ea2c 100644 --- a/kubernetes/addons/cni/calico-eBPF/kustomization.yaml +++ b/kubernetes/addons/cni/calico-eBPF/kustomization.yaml @@ -1,6 +1,6 @@ -bases: +resources: - ../calico-custom -patchesJson6902: +patches: - target: group: apps version: v1 diff --git a/kubernetes/addons/cni/calico/calico.yaml b/kubernetes/addons/cni/calico/calico.yaml index 71839f5e2..1ee7a6993 100644 --- a/kubernetes/addons/cni/calico/calico.yaml +++ b/kubernetes/addons/cni/calico/calico.yaml @@ -151,6 +151,12 @@ spec: type: string type: object type: array + ignoredInterfaces: + description: IgnoredInterfaces indicates the network interfaces that + needs to be excluded when reading device routes. + items: + type: string + type: array listenPort: description: ListenPort is the port where BGP protocol should listen. Defaults to 179 @@ -369,12 +375,23 @@ spec: remote AS number comes from the remote node's NodeBGPSpec.ASNumber, or the global default if that is not set. type: string + reachableBy: + description: Add an exact, i.e. /32, static route toward peer IP in + order to prevent route flapping. ReachableBy contains the address + of the gateway which peer can be reached by. + type: string sourceAddress: description: Specifies whether and how to configure a source address for the peerings generated by this BGPPeer resource. Default value "UseNodeIP" means to configure the node IP as the source address. "None" means not to configure a source address. type: string + ttlSecurity: + description: TTLSecurity enables the generalized TTL security mechanism + (GTSM) which protects against spoofed packets by ignoring received + packets with a smaller than expected TTL value. The provided value + is the number of hops (edges) between the peers. + type: integer type: object type: object served: true @@ -859,9 +876,10 @@ spec: [Default: false]' type: boolean bpfEnforceRPF: - description: 'BPFEnforceRPF enforce strict RPF on all interfaces with - BPF programs regardless of what is the per-interfaces or global - setting. Possible values are Disabled or Strict. [Default: Strict]' + description: 'BPFEnforceRPF enforce strict RPF on all host interfaces + with BPF programs regardless of what is the per-interfaces or global + setting. Possible values are Disabled, Strict or Loose. [Default: + Strict]' type: string bpfExtToServiceConnmark: description: 'BPFExtToServiceConnmark in BPF mode, control a 32bit @@ -880,6 +898,11 @@ spec: node appears to use the IP of the ingress node; this requires a permissive L2 network. [Default: Tunnel]' type: string + bpfHostConntrackBypass: + description: 'BPFHostConntrackBypass Controls whether to bypass Linux + conntrack in BPF mode for workloads and services. [Default: true + - bypass Linux conntrack]' + type: boolean bpfKubeProxyEndpointSlicesEnabled: description: BPFKubeProxyEndpointSlicesEnabled in BPF mode, controls whether Felix's embedded kube-proxy accepts EndpointSlices or not. @@ -896,6 +919,14 @@ spec: kube-proxy. Lower values give reduced set-up latency. Higher values reduce Felix CPU usage by batching up more work. [Default: 1s]' type: string + bpfL3IfacePattern: + description: BPFL3IfacePattern is a regular expression that allows + to list tunnel devices like wireguard or vxlan (i.e., L3 devices) + in addition to BPFDataIfacePattern. That is, tunnel interfaces not + created by Calico, that Calico workload traffic flows over as well + as any interfaces that handle incoming traffic to nodeports and + services from outside the cluster. + type: string bpfLogLevel: description: 'BPFLogLevel controls the log level of the BPF programs when in BPF dataplane mode. One of "Off", "Info", or "Debug". The @@ -944,10 +975,10 @@ spec: - type: string description: 'BPFPSNATPorts sets the range from which we randomly pick a port if there is a source port collision. This should be - within the ephemeral range as defined by RFC 6056 (1024–65535) and + within the ephemeral range as defined by RFC 6056 (1024–65535) and preferably outside the ephemeral ranges used by common operating - systems. Linux uses 32768–60999, while others mostly use the IANA - defined range 49152–65535. It is not necessarily a problem if this + systems. Linux uses 32768–60999, while others mostly use the IANA + defined range 49152–65535. It is not necessarily a problem if this range overlaps with the operating systems. Both ends of the range are inclusive. [Default: 20000:29999]' pattern: ^.* @@ -971,11 +1002,12 @@ spec: to use. Only used if UseInternalDataplaneDriver is set to false. type: string dataplaneWatchdogTimeout: - description: 'DataplaneWatchdogTimeout is the readiness/liveness timeout - used for Felix''s (internal) dataplane driver. Increase this value + description: "DataplaneWatchdogTimeout is the readiness/liveness timeout + used for Felix's (internal) dataplane driver. Increase this value if you experience spurious non-ready or non-live events when Felix is under heavy load. Decrease the value to get felix to report non-live - or non-ready more quickly. [Default: 90s]' + or non-ready more quickly. [Default: 90s] \n Deprecated: replaced + by the generic HealthTimeoutOverrides." type: string debugDisableLogDropping: type: boolean @@ -1079,15 +1111,21 @@ spec: type: object type: array featureDetectOverride: - description: FeatureDetectOverride is used to override the feature - detection. Values are specified in a comma separated list with no - spaces, example; "SNATFullyRandom=true,MASQFullyRandom=false,RestoreSupportsLock=". - "true" or "false" will force the feature, empty or omitted values - are auto-detected. + description: FeatureDetectOverride is used to override feature detection + based on auto-detected platform capabilities. Values are specified + in a comma separated list with no spaces, example; "SNATFullyRandom=true,MASQFullyRandom=false,RestoreSupportsLock=". "true" + or "false" will force the feature, empty or omitted values are auto-detected. + type: string + featureGates: + description: FeatureGates is used to enable or disable tech-preview + Calico features. Values are specified in a comma separated list + with no spaces, example; "BPFConnectTimeLoadBalancingWorkaround=enabled,XyZ=false". + This is used to enable features that are not fully production ready. type: string floatingIPs: description: FloatingIPs configures whether or not Felix will program - floating IP addresses. + non-OpenStack floating IP addresses. (OpenStack-derived floating + IPs are always programmed, regardless of this setting.) enum: - Enabled - Disabled @@ -1104,6 +1142,23 @@ spec: type: string healthPort: type: integer + healthTimeoutOverrides: + description: HealthTimeoutOverrides allows the internal watchdog timeouts + of individual subcomponents to be overriden. This is useful for + working around "false positive" liveness timeouts that can occur + in particularly stressful workloads or if CPU is constrained. For + a list of active subcomponents, see Felix's logs. + items: + properties: + name: + type: string + timeout: + type: string + required: + - name + - timeout + type: object + type: array interfaceExclude: description: 'InterfaceExclude is a comma-separated list of interfaces that Felix should exclude when monitoring for host endpoints. The @@ -1145,7 +1200,7 @@ spec: type: string iptablesBackend: description: IptablesBackend specifies which backend of iptables will - be used. The default is legacy. + be used. The default is Auto. type: string iptablesFilterAllowAction: type: string @@ -1412,8 +1467,8 @@ spec: type: boolean vxlanEnabled: description: 'VXLANEnabled overrides whether Felix should create the - VXLAN tunnel device for VXLAN networking. Optional as Felix determines - this based on the existing IP pools. [Default: nil (unset)]' + VXLAN tunnel device for IPv4 VXLAN networking. Optional as Felix + determines this based on the existing IP pools. [Default: nil (unset)]' type: boolean vxlanMTU: description: 'VXLANMTU is the MTU to set on the IPv4 VXLAN tunnel @@ -2839,7 +2894,7 @@ spec: for internal use only.' type: boolean natOutgoing: - description: When nat-outgoing is true, packets sent from Calico networked + description: When natOutgoing is true, packets sent from Calico networked containers in this pool to destinations outside of this pool will be masqueraded. type: boolean @@ -4387,7 +4442,7 @@ spec: # It can be deleted if this is a fresh installation, or if you have already # upgraded to use calico-ipam. - name: upgrade-ipam - image: docker.io/calico/cni:v3.24.0 + image: docker.io/calico/cni:v3.25.1 imagePullPolicy: IfNotPresent command: ["/opt/cni/bin/calico-ipam", "-upgrade"] envFrom: @@ -4415,7 +4470,7 @@ spec: # This container installs the CNI binaries # and CNI network config file on each node. - name: install-cni - image: docker.io/calico/cni:v3.24.0 + image: docker.io/calico/cni:v3.25.1 imagePullPolicy: IfNotPresent command: ["/opt/cni/bin/install"] envFrom: @@ -4458,7 +4513,7 @@ spec: # i.e. bpf at /sys/fs/bpf and cgroup2 at /run/calico/cgroup. Calico-node initialisation is executed # in best effort fashion, i.e. no failure for errors, to not disrupt pod creation in iptable mode. - name: "mount-bpffs" - image: docker.io/calico/node:v3.24.0 + image: docker.io/calico/node:v3.25.1 imagePullPolicy: IfNotPresent command: ["calico-node", "-init", "-best-effort"] volumeMounts: @@ -4484,7 +4539,7 @@ spec: # container programs network policy and routes on each # host. - name: calico-node - image: docker.io/calico/node:v3.24.0 + image: docker.io/calico/node:v3.25.1 imagePullPolicy: IfNotPresent envFrom: - configMapRef: @@ -4701,7 +4756,7 @@ spec: priorityClassName: system-cluster-critical containers: - name: calico-kube-controllers - image: docker.io/calico/kube-controllers:v3.24.0 + image: docker.io/calico/kube-controllers:v3.25.1 imagePullPolicy: IfNotPresent env: # Choose which controllers to run. diff --git a/kubernetes/addons/cni/calico/csi-driver.yaml b/kubernetes/addons/cni/calico/csi-driver.yaml index 837d001c8..6a43352d4 100644 --- a/kubernetes/addons/cni/calico/csi-driver.yaml +++ b/kubernetes/addons/cni/calico/csi-driver.yaml @@ -50,7 +50,7 @@ spec: effect: NoSchedule containers: - name: calico-csi - image: calico/csi:v3.24.0 + image: calico/csi:v3.25.1 imagePullPolicy: IfNotPresent args: - --nodeid=$(KUBE_NODE_NAME) @@ -75,7 +75,7 @@ spec: mountPath: /var/lib/kubelet/ mountPropagation: "Bidirectional" - name: csi-node-driver-registrar - image: calico/node-driver-registrar:v3.24.0 + image: calico/node-driver-registrar:v3.25.1 imagePullPolicy: IfNotPresent args: - --v=5 diff --git a/kubernetes/addons/cni/calico/kustomization.yaml b/kubernetes/addons/cni/calico/kustomization.yaml index f39193e32..f136ee46e 100644 --- a/kubernetes/addons/cni/calico/kustomization.yaml +++ b/kubernetes/addons/cni/calico/kustomization.yaml @@ -17,7 +17,7 @@ vars: kind: ConfigMap fieldref: fieldpath: data.ipip -patchesJson6902: +patches: - target: group: apps version: v1 diff --git a/kubernetes/addons/coredns/base/coredns.yaml b/kubernetes/addons/coredns/base/coredns.yaml index 0779f60e5..857a9226c 100644 --- a/kubernetes/addons/coredns/base/coredns.yaml +++ b/kubernetes/addons/coredns/base/coredns.yaml @@ -27,12 +27,6 @@ rules: verbs: - list - watch -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - apiGroups: - discovery.k8s.io resources: @@ -139,7 +133,7 @@ spec: kubernetes.io/os: linux containers: - name: coredns - image: registry.k8s.io/coredns/coredns:v1.9.3 + image: registry.k8s.io/coredns/coredns:v1.10.1 imagePullPolicy: IfNotPresent resources: limits: diff --git a/kubernetes/addons/dashboard/kustomization.yaml b/kubernetes/addons/dashboard/kustomization.yaml index a10a06d5c..b4febe993 100644 --- a/kubernetes/addons/dashboard/kustomization.yaml +++ b/kubernetes/addons/dashboard/kustomization.yaml @@ -1,2 +1,2 @@ -bases: +resources: - "./nodePort" diff --git a/kubernetes/addons/dashboard/nodePort/kustomization.yaml b/kubernetes/addons/dashboard/nodePort/kustomization.yaml index 67394221a..2a38dd58f 100644 --- a/kubernetes/addons/dashboard/nodePort/kustomization.yaml +++ b/kubernetes/addons/dashboard/nodePort/kustomization.yaml @@ -1,6 +1,6 @@ -bases: +resources: - "../base" -patchesJson6902: +patches: - path: nodeport.patch.json target: group: "" diff --git a/kubernetes/addons/efk/README.md b/kubernetes/addons/efk/README.md index 3198132dd..eb6868615 100644 --- a/kubernetes/addons/efk/README.md +++ b/kubernetes/addons/efk/README.md @@ -17,11 +17,11 @@ ## 基础知识 -* elasticsearch 负责存储日志。 +* **elasticsearch** 负责存储日志。 -* fluentd 负责将集群中 docker 主机上的日志发送给 elasticsearch,因此 fluentd 在 k8s 集群中需要以 daemonset 的方式运行。 +* **fluentd** 负责将集群中主机上的日志发送给 elasticsearch,因此 fluentd 在 k8s 集群中需要以 daemonset 的方式运行。 -* kibana 负责图形化展示日志信息。 +* **kibana** 负责图形化展示日志信息,Elasticsearch 开发的前端 GUI,让用户可以很方便的以图形化的接口查询 Elasticsearch 中存储的数据 ### 部署 @@ -37,9 +37,9 @@ $ kubectl proxy --address='127.0.0.1' --port=8086 --accept-hosts='^*$' 访问 http://127.0.0.1:8086/api/v1/namespaces/logging/services/kibana-logging/proxy -在 Management -> Indices 页面创建一个 index(相当于 mysql 中的一个 database),选中 Index contains time-based events,使用默认的 `logstash-*` pattern,点击 Create ; +在 **Stack Management** -> **Kibana** -> **Index Patterns** -> **Create index pattern**(创建一个 index(相当于 mysql 中的一个 database) -> **Index pattern name** 填入 `logstash-*`(重复该步骤再次添加 `node-*`)**Time field** 选择 **@timestamp** -> 点击 **Create index pattern**; -在 `Discover` 中查看日志 +在 **Analytics** -> **Discover** 中查看日志 ## 删除 @@ -58,3 +58,19 @@ $ kubectl delete -k addons/efk * https://blog.csdn.net/java_zyq/article/details/82179175 * https://docs.fluentd.org/ * https://github.com/fluent/fluent-bit/releases + +## 安装文件 + +### fluentbit + +* https://docs.fluentbit.io/manual/installation/kubernetes + +```bash +$ helm repo add fluent https://fluent.github.io/helm-charts + +$ helm template fluent/fluent-bit > fluent-bit/fluent-bit.yaml +``` + +### kibana + +* https://www.elastic.co/guide/en/kibana/current/docker.html diff --git a/kubernetes/addons/efk/cn/create-logging-namespace.yaml b/kubernetes/addons/efk/cn/create-logging-namespace.yaml new file mode 100644 index 000000000..af4bddfbf --- /dev/null +++ b/kubernetes/addons/efk/cn/create-logging-namespace.yaml @@ -0,0 +1,7 @@ +kind: Namespace +apiVersion: v1 +metadata: + name: logging + labels: + kubernetes.io/cluster-service: "true" + addonmanager.kubernetes.io/mode: Reconcile diff --git a/kubernetes/addons/efk/cn/kustomization.yaml b/kubernetes/addons/efk/cn/kustomization.yaml new file mode 100644 index 000000000..7a666c2b8 --- /dev/null +++ b/kubernetes/addons/efk/cn/kustomization.yaml @@ -0,0 +1,9 @@ +resources: +- ../es +- ../fluent-bit +- ../kibana +- ./create-logging-namespace.yaml +images: +- name: quay.io/fluentd_elasticsearch/elasticsearch:v7.16.2 + newName: ccr.ccs.tencentyun.com/quay-mirror/elasticsearch + newTag: v7.16.2 diff --git a/kubernetes/addons/efk/create-logging-namespace.yaml b/kubernetes/addons/efk/create-logging-namespace.yaml index 5321cb327..af4bddfbf 100644 --- a/kubernetes/addons/efk/create-logging-namespace.yaml +++ b/kubernetes/addons/efk/create-logging-namespace.yaml @@ -3,6 +3,5 @@ apiVersion: v1 metadata: name: logging labels: - k8s-app: logging kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile diff --git a/kubernetes/addons/efk/es/es-service.yaml b/kubernetes/addons/efk/es/es-service.yaml index 81bdfa555..a313e985d 100644 --- a/kubernetes/addons/efk/es/es-service.yaml +++ b/kubernetes/addons/efk/es/es-service.yaml @@ -4,7 +4,7 @@ metadata: name: elasticsearch-logging namespace: logging labels: - k8s-app: elasticsearch-logging + app.kubernetes.io/name: elasticsearch-logging kubernetes.io/cluster-service: "true" addonmanager.kubernetes.io/mode: Reconcile kubernetes.io/name: "Elasticsearch" @@ -21,6 +21,6 @@ spec: targetPort: 9300 publishNotReadyAddresses: true selector: - k8s-app: elasticsearch-logging + app.kubernetes.io/name: elasticsearch-logging sessionAffinity: None type: ClusterIP diff --git a/kubernetes/addons/efk/es/es-statefulset.yaml b/kubernetes/addons/efk/es/es-statefulset.yaml index 0658d36dc..f3a089dae 100644 --- a/kubernetes/addons/efk/es/es-statefulset.yaml +++ b/kubernetes/addons/efk/es/es-statefulset.yaml @@ -5,7 +5,7 @@ metadata: name: elasticsearch-logging namespace: logging labels: - k8s-app: elasticsearch-logging + app.kubernetes.io/name: elasticsearch-logging addonmanager.kubernetes.io/mode: Reconcile --- kind: ClusterRole @@ -13,7 +13,7 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: elasticsearch-logging labels: - k8s-app: elasticsearch-logging + app.kubernetes.io/name: elasticsearch-logging addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: @@ -30,7 +30,7 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: name: elasticsearch-logging labels: - k8s-app: elasticsearch-logging + app.kubernetes.io/name: elasticsearch-logging addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount @@ -49,25 +49,22 @@ metadata: name: elasticsearch-logging namespace: logging labels: - k8s-app: elasticsearch-logging - version: v7.10.2 + app.kubernetes.io/name: elasticsearch-logging addonmanager.kubernetes.io/mode: Reconcile spec: serviceName: elasticsearch-logging replicas: 2 selector: matchLabels: - k8s-app: elasticsearch-logging - version: v7.10.2 + app.kubernetes.io/name: elasticsearch-logging template: metadata: labels: - k8s-app: elasticsearch-logging - version: v7.10.2 + app.kubernetes.io/name: elasticsearch-logging spec: serviceAccountName: elasticsearch-logging containers: - - image: quay.io/fluentd_elasticsearch/elasticsearch:v7.10.2 + - image: quay.io/fluentd_elasticsearch/elasticsearch:v7.16.2 name: elasticsearch-logging # imagePullPolicy: Always # resources: diff --git a/kubernetes/addons/efk/es/image/Dockerfile b/kubernetes/addons/efk/es/image/Dockerfile new file mode 100644 index 000000000..8916c8959 --- /dev/null +++ b/kubernetes/addons/efk/es/image/Dockerfile @@ -0,0 +1,17 @@ +FROM golang:1.17.5 AS builder +COPY elasticsearch_logging_discovery.go go.mod go.sum / +RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -ldflags "-w" -o /elasticsearch_logging_discovery /elasticsearch_logging_discovery.go + + +FROM docker.elastic.co/elasticsearch/elasticsearch:7.16.2 + +VOLUME ["/data"] +EXPOSE 9200 9300 + +COPY --from=builder /elasticsearch_logging_discovery bin/ +COPY run.sh bin/ +COPY config/elasticsearch.yml config/log4j2.properties config/ + +USER root +RUN chown -R elasticsearch:elasticsearch ./ +CMD ["bin/run.sh"] diff --git a/kubernetes/addons/efk/es/image/README.md b/kubernetes/addons/efk/es/image/README.md new file mode 100644 index 000000000..5ccad01f7 --- /dev/null +++ b/kubernetes/addons/efk/es/image/README.md @@ -0,0 +1,3 @@ +* https://github.com/kubernetes/kubernetes/tree/282d178f7cee4e1663ccfa326452d8d23ac37706/cluster/addons/fluentd-elasticsearch + +* https://github.com/kubernetes-sigs/instrumentation-addons diff --git a/kubernetes/addons/efk/es/image/config/elasticsearch.yml b/kubernetes/addons/efk/es/image/config/elasticsearch.yml new file mode 100644 index 000000000..330d1512a --- /dev/null +++ b/kubernetes/addons/efk/es/image/config/elasticsearch.yml @@ -0,0 +1,15 @@ +cluster.name: kubernetes-logging + +node.name: ${NODE_NAME} +node.master: ${NODE_MASTER} +node.data: ${NODE_DATA} + +transport.profiles.default.port: ${TRANSPORT_PORT} +http.port: ${HTTP_PORT} + +path.data: /data + +network.host: "10.244.9.222" + +discovery.seed_hosts: ["10.244.9.221", "10.244.9.222"] +cluster.initial_master_nodes: ["10.244.9.221", "10.244.9.222"] diff --git a/kubernetes/addons/efk/es/image/config/log4j2.properties b/kubernetes/addons/efk/es/image/config/log4j2.properties new file mode 100644 index 000000000..f3650c1be --- /dev/null +++ b/kubernetes/addons/efk/es/image/config/log4j2.properties @@ -0,0 +1,11 @@ +status = error + +appender.console.type = Console +appender.console.name = console +appender.console.layout.type = PatternLayout +appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%m%n + +rootLogger.level = info +rootLogger.appenderRef.console.ref = console +rootLogger.action = debug +rootLogger.com.amazonaws = warn diff --git a/kubernetes/addons/efk/es/image/run.sh b/kubernetes/addons/efk/es/image/run.sh new file mode 100644 index 000000000..f76589457 --- /dev/null +++ b/kubernetes/addons/efk/es/image/run.sh @@ -0,0 +1,13 @@ +set -ex + +export NODE_NAME=${NODE_NAME:-${HOSTNAME}} +export NODE_MASTER=${NODE_MASTER:-true} +export NODE_DATA=${NODE_DATA:-true} +export HTTP_PORT=${HTTP_PORT:-9200} +export TRANSPORT_PORT=${TRANSPORT_PORT:-9300} +export MINIMUM_MASTER_NODES=${MINIMUM_MASTER_NODES:-2} + +chown -R elasticsearch:elasticsearch /data + +./bin/elasticsearch_logging_discovery >> ./config/elasticsearch.yml +exec su elasticsearch -c /usr/local/bin/docker-entrypoint.sh diff --git a/kubernetes/addons/efk/fluentd/fluent-bit-configmap.yaml b/kubernetes/addons/efk/fluent-bit/fluent-bit-configmap.demo.yaml similarity index 98% rename from kubernetes/addons/efk/fluentd/fluent-bit-configmap.yaml rename to kubernetes/addons/efk/fluent-bit/fluent-bit-configmap.demo.yaml index d0aef2990..155a1b728 100644 --- a/kubernetes/addons/efk/fluentd/fluent-bit-configmap.yaml +++ b/kubernetes/addons/efk/fluent-bit/fluent-bit-configmap.demo.yaml @@ -4,7 +4,7 @@ metadata: name: fluent-bit-config namespace: logging labels: - k8s-app: fluent-bit + app.kubernetes.io/name: fluent-bit-es data: # Configuration files: server, input, filters and output # ====================================================== @@ -48,7 +48,7 @@ data: Systemd_Filter _SYSTEMD_UNIT=kubelet@crio.service Systemd_Filter _SYSTEMD_UNIT=kubelet@cri-containerd.service Systemd_Filter _SYSTEMD_UNIT=cri-o.service - Systemd_Filter _SYSTEMD_UNIT=cri-containerd@1.6.service + Systemd_Filter _SYSTEMD_UNIT=cri-containerd@1.7.service Strip_Underscores On # Read_From_Tail On diff --git a/kubernetes/addons/efk/fluent-bit/fluent-bit-configmap.yaml b/kubernetes/addons/efk/fluent-bit/fluent-bit-configmap.yaml new file mode 100644 index 000000000..2cbff1e92 --- /dev/null +++ b/kubernetes/addons/efk/fluent-bit/fluent-bit-configmap.yaml @@ -0,0 +1,192 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: fluent-bit-config + namespace: logging + labels: + app.kubernetes.io/name: fluent-bit-es +data: + # Configuration files: server, input, filters and output + # ====================================================== + fluent-bit.conf: | + [SERVICE] + Flush 1 + Log_Level info + Daemon off + Parsers_File parsers.conf + # Parsers_File custom_parsers.conf + HTTP_Server On + HTTP_Listen 0.0.0.0 + HTTP_Port 2020 + Health_Check On + + @INCLUDE input-kubernetes.conf + @INCLUDE input-systemd.conf + @INCLUDE filter-kubernetes.conf + @INCLUDE filter-systemd-key.conf + @INCLUDE filter-systemd.conf + @INCLUDE output-elasticsearch.conf + + input-kubernetes.conf: | + [INPUT] + Name tail + Tag kube.* + Path /var/log/containers/*.log + Parser cri + DB /var/log/flb_kube.db + Mem_Buf_Limit 5MB + Skip_Long_Lines On + Refresh_Interval 10 + + input-systemd.conf: | + [INPUT] + Name systemd + Tag systemd.* + DB /var/log/flb_systemd_kube.db + Path /var/log/journal + Systemd_Filter _SYSTEMD_UNIT=kube-apiserver.service + Systemd_Filter _SYSTEMD_UNIT=kube-controller-manager.service + Systemd_Filter _SYSTEMD_UNIT=kube-scheduler.service + Systemd_Filter _SYSTEMD_UNIT=kubelet@crio.service + Systemd_Filter _SYSTEMD_UNIT=kubelet@cri-containerd.service + Systemd_Filter _SYSTEMD_UNIT=cri-o.service + Systemd_Filter _SYSTEMD_UNIT=cri-containerd@1.7.service + Strip_Underscores On + # Read_From_Tail On + + filter-kubernetes.conf: | + [FILTER] + Name kubernetes + Match kube.* + Kube_URL https://kubernetes.default.svc:443 + Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token + Kube_Tag_Prefix kube.var.log.containers. + # 若 log 为 json 则解析 + Merge_Log On + # 前缀 + Merge_Log_Key log_processed + K8S-Logging.Parser On + K8S-Logging.Exclude Off + + filter-systemd-key.conf: | + [FILTER] + Name modify + Match systemd.* + Rename BOOT_ID SYSTEMD_BOOT_ID + Rename CAP_EFFECTIVE SYSTEMD_CAP_EFFECTIVE + Rename CMDLINE SYSTEMD_CMDLINE + Rename COMM SYSTEMD_COMM + Rename EXE SYSTEMD_EXE + Rename GID SYSTEMD_GID + Rename HOSTNAME SYSTEMD_HOSTNAME + Rename MACHINE_ID SYSTEMD_MACHINE_ID + Rename MESSAGE SYSTEMD_MESSAGE + Rename PID SYSTEMD_PID + Rename PRIORITY SYSTEMD_PRIORITY + Rename STREAM_ID SYSTEMD_STREAM_ID + Rename SYSLOG_FACILITY SYSTEMD_SYSLOG_FACILITY + Rename SYSLOG_IDENTIFIER SYSTEMD_SYSLOG_IDENTIFIER + # Rename SYSTEMD_CGROUP + # Rename SYSTEMD_INVOCATION_ID + # Rename SYSTEMD_SLICE + # Rename SYSTEMD_UNIT + Rename TRANSPORT SYSTEMD_TRANSPORT + Rename UID SYSTEMD_UID + + filter-systemd.conf: | + [FILTER] + Name parser + Match systemd.kube* + Key_Name SYSTEMD_MESSAGE + Reserve_Data On + Preserve_Key On + # Unescape_Key On + Parser systemd_kube_json + + [FILTER] + Name parser + Match systemd.cri-containerd* + Key_Name SYSTEMD_MESSAGE + Reserve_Data On + Preserve_Key On + Unescape_Key On + Parser systemd_cri_containerd + + [FILTER] + Name parser + Match systemd.cri-o* + Key_Name SYSTEMD_MESSAGE + Reserve_Data On + Preserve_Key On + Unescape_Key On + Parser systemd_cri_o + + [FILTER] + Name modify + Match systemd.cri-* + Rename msg message + + parsers.conf: | + [PARSER] + Name json + Format json + Time_Key time + # https://linux.die.net/man/3/strptime + Time_Format %d/%b/%Y:%H:%M:%S %z + + [PARSER] + Name json_not_include_time + Format json + Time_Key nil + + [PARSER] + # http://rubular.com/r/tjUt3Awgg4 + # 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] XXXX + Name cri + Format regex + Regex ^(?