Skip to content

Commit bdc72bb

Browse files
committed
add someip libs to Dockerfile
1 parent f0d864c commit bdc72bb

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

dockerfiles/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,32 @@ RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/
6363
WORKDIR /src/fluent-bit/
6464
COPY . ./
6565

66+
# to build for vsomeip but not add C++ dependencies to pro
67+
FROM builder-base AS builder-vsomeip
68+
69+
WORKDIR /tmp
70+
71+
# fetch and compile boost 1.74 (for vsomeip)
72+
RUN curl -Ls https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.bz2 -o boost.tar.bz2 && \
73+
echo "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1 boost.tar.bz2" > boost-sha.txt && \
74+
sha256sum --quiet -c boost-sha.txt && \
75+
mkdir -p /opt/boost && \
76+
tar --strip-components 1 --no-same-owner --directory /opt/boost -xjf boost.tar.bz2 && \
77+
cd /opt/boost && \
78+
./bootstrap.sh && \
79+
./b2 --with-system --with-thread --with-filesystem cxxflags="-fPIC" install -j $(nproc) --variant=release link=static && \
80+
rm -rf /tmp/*
81+
82+
# fetch and compile vsomeip version 3.5.1
83+
RUN curl -Ls https://github.com/COVESA/vsomeip/archive/refs/tags/3.5.1.tar.gz -o vsomeip.tar.gz && \
84+
echo "220ff5f105ac5f7eb33071986a12505526415217b28d4dd75164b38087dc9bcc vsomeip.tar.gz" > vsomeip-sha.txt && \
85+
sha256sum --quiet -c vsomeip-sha.txt && \
86+
mkdir -p /opt/vsomeip && \
87+
tar --strip-components 1 --no-same-owner --directory /opt/vsomeip -xzf vsomeip.tar.gz && \
88+
cd /opt/vsomeip && \
89+
cmake -Bbuild -H. && cd build && make -j "$(getconf _NPROCESSORS_ONLN)" install && \
90+
rm -rf /tmp/*
91+
6692
# We split the builder setup out so people can target it or use as a base image without doing a full build.
6793
FROM builder-base AS builder
6894
WORKDIR /src/fluent-bit/build/
@@ -78,6 +104,7 @@ RUN [ -n "${WAMR_BUILD_TARGET:-}" ] && EXTRA_CMAKE_FLAGS="$EXTRA_CMAKE_FLAGS -DW
78104
cmake -DFLB_RELEASE=On \
79105
-DFLB_JEMALLOC=On \
80106
-DFLB_TLS=On \
107+
-DFLB_IN_SOMEIP=On \
81108
-DFLB_SHARED_LIB=Off \
82109
-DFLB_EXAMPLES=Off \
83110
-DFLB_HTTP_SERVER=On \
@@ -198,6 +225,12 @@ COPY --from=deb-extractor /dpkg /
198225
# Copy certificates
199226
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
200227

228+
# Copy vsomeip
229+
COPY --from=builder-vsomeip /usr/local/lib/libvsomeip* /usr/local/lib/
230+
COPY --from=builder-vsomeip /usr/local/lib/cmake/vsomeip3/* /usr/local/lib/cmake/vsomeip3/
231+
COPY --from=builder-vsomeip /usr/local/lib/pkgconfig/vsomeip3.pc /usr/local/lib/pkgconfig/
232+
COPY --from=builder-vsomeip ./usr/local/include/vsomeip/. /usr/local/include/vsomeip/
233+
201234
# Finally the binaries as most likely to change
202235
COPY --from=builder /fluent-bit /fluent-bit
203236

@@ -262,6 +295,12 @@ RUN echo "deb http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/
262295
RUN rm -f /usr/bin/qemu-*-static
263296
COPY --from=builder /fluent-bit /fluent-bit
264297

298+
# Copy vsomeip
299+
COPY --from=builder-vsomeip /usr/local/lib/libvsomeip* /usr/local/lib/
300+
COPY --from=builder-vsomeip /usr/local/lib/cmake/vsomeip3/* /usr/local/lib/cmake/vsomeip3/
301+
COPY --from=builder-vsomeip /usr/local/lib/pkgconfig/vsomeip3.pc /usr/local/lib/pkgconfig/
302+
COPY --from=builder-vsomeip ./usr/local/include/vsomeip/. /usr/local/include/vsomeip/
303+
265304
EXPOSE 2020
266305

267306
# No entry point so we can just shell in

0 commit comments

Comments
 (0)