Images: Bump Alpine to v3.21. (#12528)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
This commit is contained in:
parent
fe6d1b7ef8
commit
0d98a278b7
14 changed files with 35 additions and 19 deletions
|
|
@ -12,7 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM alpine:3.20
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
RUN apk update \
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.20 as builder
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.21 as builder
|
||||
|
||||
RUN apk update \
|
||||
&& apk upgrade && apk add git
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
ARG GOLANG_VERSION
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.20 as builder
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.21 as builder
|
||||
RUN mkdir /authsvc
|
||||
WORKDIR /authsvc
|
||||
COPY . ./
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
# limitations under the License.
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.20 as builder
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.21 as builder
|
||||
|
||||
WORKDIR /go/src/k8s.io/ingress-nginx/images/fastcgi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
ARG GOLANG_VERSION
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.20 as build
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.21 as build
|
||||
|
||||
WORKDIR /go/src/greeter-server
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
FROM alpine:3.20 as builder
|
||||
FROM alpine:3.21 as builder
|
||||
|
||||
COPY . /
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ RUN apk update \
|
|||
&& /build.sh
|
||||
|
||||
# Use a multi-stage build
|
||||
FROM alpine:3.20
|
||||
FROM alpine:3.21
|
||||
|
||||
ENV PATH=$PATH:/usr/local/luajit/bin:/usr/local/nginx/sbin:/usr/local/nginx/bin
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ RUN apk update \
|
|||
); \
|
||||
for dir in "${writeDirs[@]}"; do \
|
||||
mkdir -p ${dir}; \
|
||||
chown -R www-data.www-data ${dir}; \
|
||||
chown -R www-data:www-data ${dir}; \
|
||||
done'
|
||||
|
||||
EXPOSE 80 443
|
||||
|
|
|
|||
|
|
@ -414,6 +414,21 @@ Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-980-CORRELATION.conf
|
|||
Include /etc/nginx/owasp-modsecurity-crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
|
||||
" > /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
|
||||
|
||||
# NGINX compiles a small test program to check if an added module works as expected.
|
||||
#
|
||||
# ModSecurity-nginx provides 'printf("hello");' as a test, but newer versions of GCC,
|
||||
# as included in Alpine 3.21, do not allow implicit declaration of function 'printf':
|
||||
#
|
||||
# objs/autotest.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
|
||||
#
|
||||
# For this reason we replace 'printf("hello");' by 'msc_init();', which is always available.
|
||||
#
|
||||
# This fix is taken from a PR, that has been proposed to the ModSecurity-nginx project:
|
||||
#
|
||||
# https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/275
|
||||
#
|
||||
sed -i "s/ngx_feature_test='printf(\"hello\");'/ngx_feature_test='msc_init();'/" $BUILD_PATH/ModSecurity-nginx/config
|
||||
|
||||
# build nginx
|
||||
cd "$BUILD_PATH/nginx-$NGINX_VERSION"
|
||||
|
||||
|
|
@ -609,7 +624,7 @@ adduser -S -D -H -u 101 -h /usr/local/nginx -s /sbin/nologin -G www-data -g www-
|
|||
|
||||
for dir in "${writeDirs[@]}"; do
|
||||
mkdir -p ${dir};
|
||||
chown -R www-data.www-data ${dir};
|
||||
chown -R www-data:www-data ${dir};
|
||||
done
|
||||
|
||||
rm -rf /etc/nginx/owasp-modsecurity-crs/.git
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ ARG BASE_IMAGE
|
|||
ARG GOLANG_VERSION
|
||||
ARG ETCD_VERSION
|
||||
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.20 as GO
|
||||
FROM golang:${GOLANG_VERSION}-alpine3.21 as GO
|
||||
FROM registry.k8s.io/etcd:${ETCD_VERSION} as etcd
|
||||
|
||||
FROM ${BASE_IMAGE}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue