Skip to content

Commit

Permalink
update nginx and kubernetes version
Browse files Browse the repository at this point in the history
Signed-off-by: Kang Huaishuai <[email protected]>
  • Loading branch information
khs1994 committed Jul 20, 2024
1 parent 95e840b commit 933a3aa
Show file tree
Hide file tree
Showing 50 changed files with 285 additions and 73 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ TZ=Asia/Shanghai
# [Version]

# https://nginx.org/en/CHANGES
LNMP_NGINX_VERSION=1.25.3
LNMP_NGINX_VERSION=1.27.0

LNMP_MYSQL_VERSION=8.0.33

Expand Down Expand Up @@ -192,6 +192,7 @@ LNMP_LIBRARY_NS=library
# LNMP_LIBRARY_NS=library-mirror
# LNMP_LIBRARY_NS=ccr.ccs.tencentyun.com/library-mirror
# LNMP_LIBRARY_NS=pcit-docker.pkg.coding.net/khs1994-docker/library
# LNMP_LIBRARY_NS=hub.atomgit.com

## [PHP 项目文件路径(容器内路径)(绝对路径)]

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

### Changes:

* Switch **PHP** to `8.3.0`
* Kuberentes `v1.30.0`

### Updates:

* [PHP `8.3.0` `8.2.13` `8.1.26`](https://www.php.net/ChangeLog-8.php#8.1.26)
* [nginx `1.27.0`](https://nginx.org/en/CHANGES)
2 changes: 1 addition & 1 deletion README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ $ ./lnmp-docker down
|Name|Docker Image|Version|Based|
|:-- |:-- |:-- |:-- |
|[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.25.3-alpine` | **1.25.3** |`alpine:3.13` |
|[NGINX](https://github.com/docker-library/docs/tree/master/nginx) |`nginx:1.27.0-alpine` | **1.27.0** |`alpine:3.19` |
|[NGINX Unit](https://github.com/nginx/unit) |`khs1994/php:8.3.0-unit-alpine`| **1.30.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.33` | **8.0.33** |`oraclelinux:8-slim`|
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Please see [Documents](https://github.com/khs1994-docker/lnmp/tree/master/docs#%
|Name|Docker Image|Version|Based|
|:-- |:-- |:-- |:-- |
|[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.25.3-alpine` | **1.25.3** |`alpine:3.13` |
|[NGINX](https://github.com/docker-library/docs/tree/master/nginx) |`nginx:1.27.0-alpine` | **1.27.0** |`alpine:3.19` |
|[NGINX Unit](https://github.com/nginx/unit) |`khs1994/php:8.3.0-unit-alpine`| **1.30.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.33` | **8.0.33** |`oraclelinux:8-slim`|
Expand Down
2 changes: 1 addition & 1 deletion app/laravel-demo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

ARG NODE_VERSION=20.5.1
ARG PHP_VERSION=8.3.0
ARG NGINX_VERSION=1.25.3-alpine
ARG NGINX_VERSION=1.27.0-alpine
ARG DOCKER_HUB_USERNAME=khs1994

# 2.安装 composer 依赖
Expand Down
2 changes: 1 addition & 1 deletion app/laravel-demo/Dockerfile.buildkit
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

ARG NODE_VERSION=20.5.1
ARG PHP_VERSION=8.3.0
ARG NGINX_VERSION=1.25.3-alpine
ARG NGINX_VERSION=1.27.0-alpine
ARG DOCKER_HUB_USERNAME=khs1994

# 2.安装 composer 依赖
Expand Down
2 changes: 1 addition & 1 deletion app/laravel-demo/Dockerfile.cdn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# $ 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.3.0
ARG NGINX_VERSION=1.25.3-alpine
ARG NGINX_VERSION=1.27.0-alpine
ARG DOCKER_HUB_USERNAME=khs1994

# 2.安装 composer 依赖
Expand Down
2 changes: 1 addition & 1 deletion docker-lnmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ services:

nginx:
<< : [*common,*common-labels]
image: "${LNMP_LIBRARY_NS:-library}/nginx:${LNMP_NGINX_VERSION:-1.25.3}-alpine"
image: "${LNMP_LIBRARY_NS:-library}/nginx:${LNMP_NGINX_VERSION:-1.27.0}-alpine"
ports:
- "${LNMP_NGINX_HTTPS_PORT:-0.0.0.0:443}:443/udp"
- "${LNMP_NGINX_HTTPS_PORT:-0.0.0.0:443}:443/tcp"
Expand Down
4 changes: 2 additions & 2 deletions docker-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ services:
# context: ./dockerfile/nginx/
context: ./config/nginx
dockerfile: Dockerfile
image: nginx:1.25.3-alpine
# image: khs1994/nginx:1.25.3-alpine
image: nginx:1.27.0-alpine
# image: khs1994/nginx:1.27.0-alpine
ports:
- "443:443/tcp"
- "443:443/udp"
Expand Down
201 changes: 201 additions & 0 deletions dockerfile/freenginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM alpine:3.19

LABEL maintainer="NGINX Docker Maintainers <[email protected]>"

ENV NGINX_VERSION 1.27.0
ENV PKG_RELEASE 2

RUN set -x \
# create nginx user/group first, to be consistent throughout docker variants
&& addgroup -g 101 -S nginx \
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
&& apkArch="$(cat /etc/apk/arch)" \
&& nginxPackages=" \
nginx=${NGINX_VERSION}-r${PKG_RELEASE} \
" \
# install prerequisites for public key and pkg-oss checks
&& apk add --no-cache --virtual .checksum-deps \
openssl \
&& case "$apkArch" in \
x86_64|aarch64) \
# arches officially built by upstream
set -x \
&& KEY_SHA512="e09fa32f0a0eab2b879ccbbc4d0e4fb9751486eedda75e35fac65802cc9faa266425edf83e261137a2f4d16281ce2c1a5f4502930fe75154723da014214f0655" \
&& wget -O /tmp/nginx_signing.rsa.pub https://nginx.org/keys/nginx_signing.rsa.pub \
&& if echo "$KEY_SHA512 */tmp/nginx_signing.rsa.pub" | sha512sum -c -; then \
echo "key verification succeeded!"; \
mv /tmp/nginx_signing.rsa.pub /etc/apk/keys/; \
else \
echo "key verification failed!"; \
exit 1; \
fi \
&& apk add -X "https://nginx.org/packages/mainline/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages \
;; \
*) \
# we're on an architecture upstream doesn't officially build for
# let's build binaries from the published packaging sources
set -x \
&& tempDir="$(mktemp -d)" \
&& chown nobody:nobody $tempDir \
&& apk add --no-cache --virtual .build-deps \
gcc \
libc-dev \
make \
openssl-dev \
pcre2-dev \
zlib-dev \
linux-headers \
bash \
alpine-sdk \
findutils \
&& su nobody -s /bin/sh -c " \
export HOME=${tempDir} \
&& cd ${tempDir} \
&& curl -f -O https://hg.nginx.org/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \
&& PKGOSSCHECKSUM=\"cd3333f4dfa4a873f6df73dfe24e047adc092d779aefb46577b6307ff0d0125543508694a80158b2bfc891167ad763b0d08287829df9924d4c22f50d063e76c0 *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" \
&& if [ \"\$(openssl sha512 -r ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then \
echo \"pkg-oss tarball checksum verification succeeded!\"; \
else \
echo \"pkg-oss tarball checksum verification failed!\"; \
exit 1; \
fi \
&& tar xzvf ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \
&& cd pkg-oss-${NGINX_VERSION}-${PKG_RELEASE} \
&& cd alpine \
&& make base \
&& apk index --allow-untrusted -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk \
&& abuild-sign -k ${tempDir}/.abuild/abuild-key.rsa ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz \
" \
&& cp ${tempDir}/.abuild/abuild-key.rsa.pub /etc/apk/keys/ \
&& apk del --no-network .build-deps \
&& apk add -X ${tempDir}/packages/alpine/ --no-cache $nginxPackages \
;; \
esac \
# remove checksum deps
&& apk del --no-network .checksum-deps \
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
&& if [ -n "$tempDir" ]; then rm -rf "$tempDir"; fi \
&& if [ -f "/etc/apk/keys/abuild-key.rsa.pub" ]; then rm -f /etc/apk/keys/abuild-key.rsa.pub; fi \
# Bring in gettext so we can get `envsubst`, then throw
# the rest away. To do this, we need to install `gettext`
# then move `envsubst` out of the way so `gettext` can
# be deleted completely, then move `envsubst` back.
&& apk add --no-cache --virtual .gettext gettext \
&& mv /usr/bin/envsubst /tmp/ \
\
&& runDeps="$( \
scanelf --needed --nobanner /tmp/envsubst \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" \
&& apk add --no-cache $runDeps \
&& apk del --no-network .gettext \
&& mv /tmp/envsubst /usr/local/bin/ \
# Bring in tzdata so users could set the timezones through the environment
# variables
&& apk add --no-cache tzdata \
# forward request and error logs to docker log collector
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
# create a docker-entrypoint.d directory
&& mkdir /docker-entrypoint.d

COPY docker-entrypoint.sh /
COPY 10-listen-on-ipv6-by-default.sh /docker-entrypoint.d
COPY 15-local-resolvers.envsh /docker-entrypoint.d
COPY 20-envsubst-on-templates.sh /docker-entrypoint.d
COPY 30-tune-worker-processes.sh /docker-entrypoint.d
ENTRYPOINT ["/docker-entrypoint.sh"]

EXPOSE 80

STOPSIGNAL SIGQUIT

CMD ["nginx", "-g", "daemon off;"]


#
# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh"
#
# PLEASE DO NOT EDIT IT DIRECTLY.
#
FROM nginx:1.27.0-alpine-slim

ENV NJS_VERSION 0.8.4
ENV NJS_RELEASE 2

RUN set -x \
&& apkArch="$(cat /etc/apk/arch)" \
&& nginxPackages=" \
nginx=${NGINX_VERSION}-r${PKG_RELEASE} \
nginx-module-xslt=${NGINX_VERSION}-r${PKG_RELEASE} \
nginx-module-geoip=${NGINX_VERSION}-r${PKG_RELEASE} \
nginx-module-image-filter=${NGINX_VERSION}-r${PKG_RELEASE} \
nginx-module-njs=${NGINX_VERSION}.${NJS_VERSION}-r${NJS_RELEASE} \
" \
# install prerequisites for public key and pkg-oss checks
&& apk add --no-cache --virtual .checksum-deps \
openssl \
&& case "$apkArch" in \
x86_64|aarch64) \
# arches officially built by upstream
apk add -X "https://nginx.org/packages/mainline/alpine/v$(egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" --no-cache $nginxPackages \
;; \
*) \
# we're on an architecture upstream doesn't officially build for
# let's build binaries from the published packaging sources
set -x \
&& tempDir="$(mktemp -d)" \
&& chown nobody:nobody $tempDir \
&& apk add --no-cache --virtual .build-deps \
gcc \
libc-dev \
make \
openssl-dev \
pcre2-dev \
zlib-dev \
linux-headers \
libxslt-dev \
gd-dev \
geoip-dev \
libedit-dev \
bash \
alpine-sdk \
findutils \
&& su nobody -s /bin/sh -c " \
export HOME=${tempDir} \
&& cd ${tempDir} \
&& curl -f -O https://hg.nginx.org/pkg-oss/archive/${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \
&& PKGOSSCHECKSUM=\"cd3333f4dfa4a873f6df73dfe24e047adc092d779aefb46577b6307ff0d0125543508694a80158b2bfc891167ad763b0d08287829df9924d4c22f50d063e76c0 *${NGINX_VERSION}-${PKG_RELEASE}.tar.gz\" \
&& if [ \"\$(openssl sha512 -r ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz)\" = \"\$PKGOSSCHECKSUM\" ]; then \
echo \"pkg-oss tarball checksum verification succeeded!\"; \
else \
echo \"pkg-oss tarball checksum verification failed!\"; \
exit 1; \
fi \
&& tar xzvf ${NGINX_VERSION}-${PKG_RELEASE}.tar.gz \
&& cd pkg-oss-${NGINX_VERSION}-${PKG_RELEASE} \
&& cd alpine \
&& make module-geoip module-image-filter module-njs module-xslt \
&& apk index --allow-untrusted -o ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz ${tempDir}/packages/alpine/${apkArch}/*.apk \
&& abuild-sign -k ${tempDir}/.abuild/abuild-key.rsa ${tempDir}/packages/alpine/${apkArch}/APKINDEX.tar.gz \
" \
&& cp ${tempDir}/.abuild/abuild-key.rsa.pub /etc/apk/keys/ \
&& apk del --no-network .build-deps \
&& apk add -X ${tempDir}/packages/alpine/ --no-cache $nginxPackages \
;; \
esac \
# remove checksum deps
&& apk del --no-network .checksum-deps \
# if we have leftovers from building, let's purge them (including extra, unnecessary build deps)
&& if [ -n "$tempDir" ]; then rm -rf "$tempDir"; fi \
&& if [ -f "/etc/apk/keys/abuild-key.rsa.pub" ]; then rm -f /etc/apk/keys/abuild-key.rsa.pub; fi \
# Bring in curl and ca-certificates to make registering on DNS SD easier
&& apk add --no-cache curl ca-certificates
2 changes: 1 addition & 1 deletion dockerfile/nginx/.env.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NGINX_VERSION=1.25.3
NGINX_VERSION=1.27.0
4 changes: 2 additions & 2 deletions dockerfile/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ version: "3"

services:
nginx:
image: "khs1994/nginx:1.25.3-alpine"
image: "khs1994/nginx:1.27.0-alpine"
ports:
- "80:80"
- "443:443/tcp"
Expand All @@ -57,7 +57,7 @@ $ docker run -dit \
-p 443:443/udp \
-v $PWD/app:/app \
-v $PWD/conf.d:/etc/nginx/conf.d \
khs1994/nginx:1.25.3-alpine
khs1994/nginx:1.27.0-alpine
```

# Who use it?
Expand Down
2 changes: 1 addition & 1 deletion dockerfile/nginx/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ FROM alpine:3.16

LABEL maintainer="khs1994.com nginx With HTTP3"

ARG NGINX_VERSION=1.25.3
ARG NGINX_VERSION=1.27.0

ARG ALPINE_URL=dl-cdn.alpinelinux.org

Expand Down
2 changes: 1 addition & 1 deletion dockerfile/nginx/buster/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM debian:buster-slim

ARG NGINX_VERSION=1.25.3
ARG NGINX_VERSION=1.27.0

ARG DEB_URL=deb.debian.org

Expand Down
10 changes: 5 additions & 5 deletions dockerfile/nginx/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ services:
context: ./alpine
args:
# OPENSSL_BRANCH: master
NGINX_VERSION: ${NGINX_VERSION:-1.25.3}
NGINX_VERSION: ${NGINX_VERSION:-1.27.0}
ALPINE_URL: mirrors.aliyun.com # dl-cdn.alpinelinux.org
OPENSSL_URL: https://github.com.cnpmjs.org/google/boringssl
image: khs1994/nginx:${NGINX_VERSION:-1.25.3}-alpine
image: khs1994/nginx:${NGINX_VERSION:-1.27.0}-alpine
ports:
- 443:443/tcp
- 443:443/udp
Expand All @@ -23,11 +23,11 @@ services:
context: ./buster
args:
# OPENSSL_BRANCH: master
NGINX_VERSION: ${NGINX_VERSION:-1.25.3}
NGINX_VERSION: ${NGINX_VERSION:-1.27.0}
OPENSSL_URL: https://github.com.cnpmjs.org/google/boringssl
DEB_URL: mirrors.ustc.edu.cn # deb.debian.org
DEB_SECURITY_URL: mirrors.ustc.edu.cn/debian-security # security.debian.org/debian-security
image: khs1994/nginx:${NGINX_VERSION:-1.25.3}-buster
image: khs1994/nginx:${NGINX_VERSION:-1.27.0}-buster
ports:
- 443:443/tcp
- 443:443/udp
Expand All @@ -36,7 +36,7 @@ services:
- ./conf.d:/etc/nginx/conf.d:ro

official:
image: nginx:1.25.3-alpine
image: nginx:1.27.0-alpine
ports:
- 443:443
- 80:80
Expand Down
1 change: 0 additions & 1 deletion dockerfile/php/nightly/cli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ ENV PHPIZE_DEPS \
file \
g++ \
gcc \
libc-dev \
make \
pkgconf \
re2c
Expand Down
1 change: 0 additions & 1 deletion dockerfile/php/nightly/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ ENV PHPIZE_DEPS \
file \
g++ \
gcc \
libc-dev \
make \
pkgconf \
re2c
Expand Down
4 changes: 2 additions & 2 deletions dockerfile/sync/docker-image-sync-main.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"dest": "library-mirror/nginx:alpine"
},
{
"source": "library/nginx:1.25.3-alpine",
"dest": "library-mirror/nginx:1.25.3-alpine"
"source": "library/nginx:1.27.0-alpine",
"dest": "library-mirror/nginx:1.27.0-alpine"
},
{
"source": "library/phpmyadmin:fpm-alpine",
Expand Down
Loading

0 comments on commit 933a3aa

Please sign in to comment.