chore(ci): adding support for address-sanitizer images' build in dockerfiles

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
Raphael Defosseux
2023-11-29 08:59:36 +01:00
committed by Robert Schmidt
parent 6debc5dd21
commit 2a82e36e71
7 changed files with 66 additions and 6 deletions
+7 -1
View File
@@ -32,6 +32,7 @@ FROM ran-build:latest AS nr-ue-build
#start from scratch for target executable
FROM ubuntu:focal as oai-nr-ue
ARG SANITIZE_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
@@ -56,6 +57,10 @@ RUN apt-get update && \
iputils-ping \
iproute2 \
iperf && \
# if the --sanitize option was used to build, additional packages are required
/bin/bash -c 'if [[ "$SANITIZE_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
libasan5 \
libubsan1; fi' && \
rm -rf /var/lib/apt/lists/*
WORKDIR /opt/oai-nr-ue/bin
@@ -95,7 +100,8 @@ COPY --from=nr-ue-base \
/usr/lib/x86_64-linux-gnu/
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
ldconfig
ldconfig && \
ldd /opt/oai-nr-ue/bin/nr-uesoftmodem
WORKDIR /opt/oai-nr-ue
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]