1
- # syntax=docker/dockerfile:1.3
1
+ # syntax=docker/dockerfile:1.8
2
2
ARG BUILD_OS=debian
3
- ARG BUILD_NGINX_VERSION=1.27.0
4
3
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.4.0 AS xx
5
4
6
5
# ## Build base image for debian
7
- FROM --platform=$BUILDPLATFORM debian:bullseye as build-base-debian
6
+ FROM --platform=$BUILDPLATFORM debian:11 AS build-base-debian
8
7
9
8
RUN apt-get update \
10
9
&& apt-get install --no-install-recommends --no-install-suggests -y \
@@ -30,7 +29,7 @@ RUN xx-apt install -y xx-cxx-essentials zlib1g-dev libcurl4-openssl-dev libc-are
30
29
31
30
32
31
# ## Build base image for alpine
33
- FROM --platform=$BUILDPLATFORM alpine:3.20 as build-base-alpine
32
+ FROM --platform=$BUILDPLATFORM alpine:3.20 AS build-base-alpine
34
33
35
34
RUN apk add --no-cache \
36
35
alpine-sdk \
@@ -52,9 +51,9 @@ RUN xx-apk add --no-cache xx-cxx-essentials openssl-dev zlib-dev zlib libgcc cur
52
51
53
52
54
53
# ## Build image
55
- FROM build-base-${BUILD_OS} as build-base
54
+ FROM build-base-${BUILD_OS} AS build-base
56
55
57
- ENV CMAKE_VERSION 3.22.2
56
+ ENV CMAKE_VERSION=3.29.6
58
57
RUN wget -q -O cmake-linux.sh "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(arch).sh" \
59
58
&& sh cmake-linux.sh -- --skip-license --prefix=/usr \
60
59
&& rm cmake-linux.sh
@@ -64,7 +63,7 @@ ENV XX_CC_PREFER_STATIC_LINKER=1
64
63
65
64
66
65
# # Build gRPC
67
- FROM build-base as grpc
66
+ FROM build-base AS grpc
68
67
ARG GRPC_VERSION=v1.40.x
69
68
ARG TARGETPLATFORM
70
69
@@ -91,7 +90,7 @@ RUN xx-info env && git clone --depth 1 -b $GRPC_VERSION https://github.com/grpc/
91
90
92
91
93
92
# ## Build opentracing-cpp
94
- FROM build-base as opentracing-cpp
93
+ FROM build-base AS opentracing-cpp
95
94
ARG OPENTRACING_CPP_VERSION=v1.6.0
96
95
ARG TARGETPLATFORM
97
96
@@ -112,7 +111,7 @@ RUN xx-info env && git clone --depth 1 -b $OPENTRACING_CPP_VERSION https://githu
112
111
113
112
114
113
# ## Build zipkin-cpp-opentracing
115
- FROM opentracing-cpp as zipkin-cpp-opentracing
114
+ FROM opentracing-cpp AS zipkin-cpp-opentracing
116
115
ARG ZIPKIN_CPP_VERSION=master
117
116
ARG TARGETPLATFORM
118
117
@@ -133,7 +132,7 @@ RUN [ "$(xx-info vendor)" = "alpine" ] && export QEMU_LD_PREFIX=/$(xx-info); \
133
132
134
133
135
134
# ## Build Jaeger cpp-client
136
- FROM opentracing-cpp as jaeger-cpp-client
135
+ FROM opentracing-cpp AS jaeger-cpp-client
137
136
ARG JAEGER_CPP_VERSION=v0.9.0
138
137
ARG YAML_CPP_VERSION=yaml-cpp-0.7.0
139
138
ARG TARGETPLATFORM
@@ -184,7 +183,7 @@ RUN git clone --depth 1 -b $JAEGER_CPP_VERSION https://github.com/jaegertracing/
184
183
185
184
186
185
# ## Build dd-opentracing-cpp
187
- FROM opentracing-cpp as dd-opentracing-cpp
186
+ FROM opentracing-cpp AS dd-opentracing-cpp
188
187
ARG DATADOG_VERSION=master
189
188
ARG TARGETPLATFORM
190
189
@@ -202,23 +201,24 @@ RUN xx-info env && git clone --depth 1 -b $DATADOG_VERSION https://github.com/Da
202
201
203
202
204
203
# ## Base build image for debian
205
- FROM nginx:${BUILD_NGINX_VERSION}-bookworm as build-nginx-debian
204
+ FROM nginx:1.27.0 AS build-nginx-debian
206
205
207
- RUN echo "deb-src [signed-by=/etc/apt/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian/ bookworm nginx" >> /etc/apt/sources.list.d/nginx.list \
206
+ RUN DEBIAN_VERSION=$(awk -F '=' '/^VERSION_CODENAME=/ {print $2}' /etc/os-release) \
207
+ && echo "deb-src [signed-by=/etc/apt/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian/ ${DEBIAN_VERSION} nginx" >> /etc/apt/sources.list.d/nginx.list \
208
208
&& apt-get update \
209
209
&& apt-get build-dep -y nginx
210
210
211
211
212
212
# ## Base build image for alpine
213
- FROM nginx:${BUILD_NGINX_VERSION} -alpine AS build-nginx-alpine
213
+ FROM nginx:1.27.0 -alpine AS build-nginx-alpine
214
214
RUN apk add --no-cache \
215
215
build-base \
216
216
pcre2-dev \
217
217
zlib-dev
218
218
219
219
220
220
# ## Build nginx-opentracing modules
221
- FROM build-nginx-${BUILD_OS} as build-nginx
221
+ FROM build-nginx-${BUILD_OS} AS build-nginx
222
222
223
223
COPY --from=jaeger-cpp-client /hunter /hunter
224
224
COPY . /src
@@ -237,16 +237,16 @@ RUN curl -fsSL -O https://github.com/nginx/nginx/archive/release-${NGINX_VERSION
237
237
238
238
239
239
# ## Base image for alpine
240
- FROM nginx:${BUILD_NGINX_VERSION} -alpine as nginx-alpine
240
+ FROM nginx:1.27.0 -alpine AS nginx-alpine
241
241
RUN apk add --no-cache libstdc++
242
242
243
243
244
244
# ## Base image for debian
245
- FROM nginx:${BUILD_NGINX_VERSION}-bookworm as nginx-debian
245
+ FROM nginx:1.27.0 AS nginx-debian
246
246
247
247
248
248
# ## Build final image
249
- FROM nginx-${BUILD_OS} as final
249
+ FROM nginx-${BUILD_OS} AS final
250
250
251
251
COPY --from=build-nginx /usr/lib/nginx/modules/ /usr/lib/nginx/modules/
252
252
COPY --from=dd-opentracing-cpp /usr/local/lib/ /usr/local/lib/
0 commit comments