File tree 14 files changed +35
-19
lines changed
docs/examples/customization/sysctl
custom-error-pages/rootfs
ext-auth-example-authsvc/rootfs
fastcgi-helloserver/rootfs
go-grpc-greeter-server/rootfs
14 files changed +35
-19
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ clean-chroot-image: ## Removes local image
110
110
111
111
.PHONY : build
112
112
build : # # Build ingress controller, debug tool and pre-stop hook.
113
- E2E_IMAGE=golang:$(GO_VERSION ) -alpine3.20 USE_SHELL=/bin/sh build/run-in-docker.sh \
113
+ E2E_IMAGE=golang:$(GO_VERSION ) -alpine3.21 USE_SHELL=/bin/sh build/run-in-docker.sh \
114
114
MAC_OS=$(MAC_OS ) \
115
115
PKG=$(PKG ) \
116
116
ARCH=$(ARCH ) \
Original file line number Diff line number Diff line change 4
4
"spec" : {
5
5
"initContainers" : [{
6
6
"name" : " sysctl" ,
7
- "image" : " alpine:3.20 " ,
7
+ "image" : " alpine:3.21 " ,
8
8
"securityContext" : {
9
9
"privileged" : true
10
10
},
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- FROM alpine:3.20
15
+ FROM alpine:3.21
16
16
17
17
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
18
18
RUN apk update \
Original file line number Diff line number Diff line change 14
14
15
15
ARG GOLANG_VERSION
16
16
17
- FROM golang:${GOLANG_VERSION}-alpine3.20 as builder
17
+ FROM golang:${GOLANG_VERSION}-alpine3.21 as builder
18
18
19
19
RUN apk update \
20
20
&& apk upgrade && apk add git
Original file line number Diff line number Diff line change 1
1
ARG GOLANG_VERSION
2
2
3
- FROM golang:${GOLANG_VERSION}-alpine3.20 as builder
3
+ FROM golang:${GOLANG_VERSION}-alpine3.21 as builder
4
4
RUN mkdir /authsvc
5
5
WORKDIR /authsvc
6
6
COPY . ./
Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
ARG GOLANG_VERSION
15
15
16
- FROM golang:${GOLANG_VERSION}-alpine3.20 as builder
16
+ FROM golang:${GOLANG_VERSION}-alpine3.21 as builder
17
17
18
18
WORKDIR /go/src/k8s.io/ingress-nginx/images/fastcgi
19
19
Original file line number Diff line number Diff line change 1
1
ARG GOLANG_VERSION
2
2
3
- FROM golang:${GOLANG_VERSION}-alpine3.20 as build
3
+ FROM golang:${GOLANG_VERSION}-alpine3.21 as build
4
4
5
5
WORKDIR /go/src/greeter-server
6
6
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- FROM alpine:3.20 as builder
14
+ FROM alpine:3.21 as builder
15
15
16
16
COPY . /
17
17
@@ -21,7 +21,7 @@ RUN apk update \
21
21
&& /build.sh
22
22
23
23
# Use a multi-stage build
24
- FROM alpine:3.20
24
+ FROM alpine:3.21
25
25
26
26
ENV PATH=$PATH:/usr/local/luajit/bin:/usr/local/nginx/sbin:/usr/local/nginx/bin
27
27
@@ -66,7 +66,7 @@ RUN apk update \
66
66
); \
67
67
for dir in "${writeDirs[@]}"; do \
68
68
mkdir -p ${dir}; \
69
- chown -R www-data. www-data ${dir}; \
69
+ chown -R www-data: www-data ${dir}; \
70
70
done'
71
71
72
72
EXPOSE 80 443
Original file line number Diff line number Diff line change @@ -414,6 +414,21 @@ Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-980-CORRELATION.conf
414
414
Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
415
415
" > /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
416
416
417
+ # NGINX compiles a small test program to check if an added module works as expected.
418
+ #
419
+ # ModSecurity-nginx provides 'printf("hello");' as a test, but newer versions of GCC,
420
+ # as included in Alpine 3.21, do not allow implicit declaration of function 'printf':
421
+ #
422
+ # objs/autotest.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
423
+ #
424
+ # For this reason we replace 'printf("hello");' by 'msc_init();', which is always available.
425
+ #
426
+ # This fix is taken from a PR, that has been proposed to the ModSecurity-nginx project:
427
+ #
428
+ # https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/275
429
+ #
430
+ sed -i " s/ngx_feature_test='printf(\" hello\" );'/ngx_feature_test='msc_init();'/" $BUILD_PATH /ModSecurity-nginx/config
431
+
417
432
# build nginx
418
433
cd " $BUILD_PATH /nginx-$NGINX_VERSION "
419
434
@@ -609,7 +624,7 @@ adduser -S -D -H -u 101 -h /usr/local/nginx -s /sbin/nologin -G www-data -g www-
609
624
610
625
for dir in " ${writeDirs[@]} " ; do
611
626
mkdir -p ${dir} ;
612
- chown -R www-data. www-data ${dir} ;
627
+ chown -R www-data: www-data ${dir} ;
613
628
done
614
629
615
630
rm -rf /etc/nginx/owasp-modsecurity-crs/.git
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ ARG BASE_IMAGE
15
15
ARG GOLANG_VERSION
16
16
ARG ETCD_VERSION
17
17
18
- FROM golang:${GOLANG_VERSION}-alpine3.20 as GO
18
+ FROM golang:${GOLANG_VERSION}-alpine3.21 as GO
19
19
FROM registry.k8s.io/etcd:${ETCD_VERSION} as etcd
20
20
21
21
FROM ${BASE_IMAGE}
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ RUN bash -xeu -c ' \
59
59
); \
60
60
for dir in "${writeDirs[@]}"; do \
61
61
mkdir -p ${dir}; \
62
- chown -R www-data. www-data ${dir}; \
62
+ chown -R www-data: www-data ${dir}; \
63
63
done' \
64
64
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
65
65
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ RUN apk update \
23
23
&& apk upgrade \
24
24
&& /chroot.sh
25
25
26
- FROM alpine:3.20
26
+ FROM alpine:3.21
27
27
28
28
ARG TARGETARCH
29
29
ARG VERSION
@@ -78,7 +78,7 @@ RUN bash -xeu -c ' \
78
78
); \
79
79
for dir in "${writeDirs[@]}"; do \
80
80
mkdir -p ${dir}; \
81
- chown -R www-data. www-data ${dir}; \
81
+ chown -R www-data: www-data ${dir}; \
82
82
done' \
83
83
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
84
84
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
@@ -103,7 +103,7 @@ RUN ln -sf /chroot/etc/nginx /etc/nginx \
103
103
&& touch /chroot/var/log/nginx/access.log \
104
104
&& chown www-data:www-data /chroot/var/log/nginx/access.log \
105
105
&& echo "" > /chroot/etc/resolv.conf \
106
- && chown -R www-data. www-data /chroot/var/log/nginx /chroot/etc/resolv.conf \
106
+ && chown -R www-data: www-data /chroot/var/log/nginx /chroot/etc/resolv.conf \
107
107
&& mknod -m 0666 /chroot/dev/null c 1 3 \
108
108
&& mknod -m 0666 /chroot/dev/random c 1 8 \
109
109
&& mknod -m 0666 /chroot/dev/urandom c 1 9 \
Original file line number Diff line number Diff line change @@ -39,12 +39,13 @@ writeDirs=( \
39
39
40
40
for dir in " ${writeDirs[@]} " ; do
41
41
mkdir -p ${dir} ;
42
- chown -R www-data. www-data ${dir} ;
42
+ chown -R www-data: www-data ${dir} ;
43
43
done
44
44
45
45
mkdir -p /chroot/lib /chroot/proc /chroot/usr /chroot/bin /chroot/dev /chroot/run
46
46
cp /etc/passwd /etc/group /etc/hosts /chroot/etc/
47
47
cp -a /usr/* /chroot/usr/
48
48
cp -a /etc/nginx/* /chroot/etc/nginx/
49
49
cp -a /etc/ingress-controller/* /chroot/etc/ingress-controller/
50
- cp /lib/ld-musl-* /lib/libcrypto* /lib/libssl* /lib/libz* /chroot/lib/
50
+ cp /lib/ld-musl-* /chroot/lib/
51
+ cp /usr/lib/libcrypto* /usr/lib/libssl* /usr/lib/libz* /chroot/usr/lib/
Original file line number Diff line number Diff line change 1
1
ARG E2E_BASE_IMAGE
2
2
FROM ${E2E_BASE_IMAGE} AS BASE
3
3
4
- FROM alpine:3.20
4
+ FROM alpine:3.21
5
5
6
6
RUN apk update \
7
7
&& apk upgrade && apk add -U --no-cache \
You can’t perform that action at this time.
0 commit comments