forked from opentracing-contrib/nginx-opentracing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-test
52 lines (46 loc) · 1.39 KB
/
Dockerfile-test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ubuntu:24.04
ARG OPENTRACING_CPP_VERSION=v1.6.0
ARG NGINX_VERSION=1.27.0
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND="noninteractive" apt-get install --no-install-recommends --no-install-suggests -y \
build-essential \
gettext \
cmake \
git \
gnupg2 \
software-properties-common \
curl \
python3 \
jq \
ca-certificates \
wget \
libpcre3 libpcre3-dev \
zlib1g-dev
### Build opentracing-cpp
RUN cd / \
&& git clone --depth 1 -b $OPENTRACING_CPP_VERSION https://github.com/opentracing/opentracing-cpp.git \
&& cd opentracing-cpp \
&& mkdir .build && cd .build \
&& cmake -DCMAKE_BUILD_TYPE=Debug \
-DBUILD_TESTING=OFF .. \
&& make && make install
COPY ./opentracing /opentracing
### Build nginx
RUN apt-get install -y libssl-dev
RUN cd / \
&& wget -O nginx-release-${NGINX_VERSION}.tar.gz https://github.com/nginx/nginx/archive/release-${NGINX_VERSION}.tar.gz \
&& tar zxf nginx-release-${NGINX_VERSION}.tar.gz \
&& cd /nginx-release-${NGINX_VERSION} \
# Temporarily disable leak sanitizer to get around false positives in build
&& export ASAN_OPTIONS=detect_leaks=0 \
&& export CFLAGS="-Wno-error" \
&& auto/configure \
--with-http_auth_request_module \
--with-compat \
--with-debug \
# enables grpc
--with-http_v2_module \
--add-dynamic-module=/opentracing \
&& make && make install
CMD ["/usr/local/nginx/sbin/nginx", "-g", "daemon off;"]