summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extras/hs-test/Dockerfile.nginx14
-rw-r--r--extras/hs-test/Dockerfile.vpp4
-rwxr-xr-xextras/hs-test/resources/nginx/start.sh6
-rwxr-xr-xextras/hs-test/script/build.sh4
-rw-r--r--extras/hs-test/vars2
5 files changed, 18 insertions, 12 deletions
diff --git a/extras/hs-test/Dockerfile.nginx b/extras/hs-test/Dockerfile.nginx
index ece73766f18..930151fefef 100644
--- a/extras/hs-test/Dockerfile.nginx
+++ b/extras/hs-test/Dockerfile.nginx
@@ -1,8 +1,16 @@
-FROM nginx:1.22.1
+ARG UBUNTU_VERSION
+
+FROM ubuntu:${UBUNTU_VERSION}
+
+RUN apt-get update
+RUN apt-get install -y nginx
+RUN rm -rf /var/lib/apt/lists/*
COPY vpp-data/lib/* /usr/lib/
COPY resources/nginx/vcl.conf /vcl.conf
COPY resources/nginx/nginx.conf /nginx.conf
-COPY resources/nginx/start.sh /start.sh
-ENTRYPOINT ["/start.sh"]
+ENV VCL_CONFIG=/vcl.conf
+ENV LD_PRELOAD=/usr/lib/libvcl_ldpreload.so
+
+ENTRYPOINT ["nginx", "-c", "/nginx.conf"]
diff --git a/extras/hs-test/Dockerfile.vpp b/extras/hs-test/Dockerfile.vpp
index 45b6287cdbd..f95df2277c9 100644
--- a/extras/hs-test/Dockerfile.vpp
+++ b/extras/hs-test/Dockerfile.vpp
@@ -1,4 +1,6 @@
-FROM ubuntu:22.04
+ARG UBUNTU_VERSION
+
+FROM ubuntu:${UBUNTU_VERSION}
RUN apt-get update \
&& apt-get install -y openssl libapr1 libnuma1 libsubunit0 \
diff --git a/extras/hs-test/resources/nginx/start.sh b/extras/hs-test/resources/nginx/start.sh
deleted file mode 100755
index 29e49021d9a..00000000000
--- a/extras/hs-test/resources/nginx/start.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-LDP_PATH=/usr/lib/libvcl_ldpreload.so
-VCL_CFG=/vcl.conf
-LD_PRELOAD=$LDP_PATH VCL_CONFIG=$VCL_CFG nginx -c /nginx.conf
-tail -f /dev/null
diff --git a/extras/hs-test/script/build.sh b/extras/hs-test/script/build.sh
index b8962ec989e..5c51244cf9f 100755
--- a/extras/hs-test/script/build.sh
+++ b/extras/hs-test/script/build.sh
@@ -10,5 +10,5 @@ mkdir -p ${bin} ${lib} || true
cp ${VPP_WS}/build-root/build-vpp_debug-native/vpp/bin/* ${bin}
cp -r ${VPP_WS}/build-root/build-vpp_debug-native/vpp/lib/x86_64-linux-gnu/* ${lib}
-docker build -t hs-test/vpp -f Dockerfile.vpp .
-docker build -t hs-test/nginx-ldp -f Dockerfile.nginx .
+docker build --build-arg UBUNTU_VERSION -t hs-test/vpp -f Dockerfile.vpp .
+docker build --build-arg UBUNTU_VERSION -t hs-test/nginx-ldp -f Dockerfile.nginx .
diff --git a/extras/hs-test/vars b/extras/hs-test/vars
index 1717b114de7..b48793bcc29 100644
--- a/extras/hs-test/vars
+++ b/extras/hs-test/vars
@@ -2,3 +2,5 @@ export VPP_WS=../../
export HST_LDPRELOAD=${VPP_WS}/build-root/build-vpp_debug-native/vpp/lib/x86_64-linux-gnu/libvcl_ldpreload.so
export PATH=${VPP_WS}/build-root/build-vpp_debug-native/vpp/bin:$PATH
+
+export UBUNTU_VERSION=22.04