Dockerfile with Minimal dependency for bbfdm compilation

This commit is contained in:
Vivek Kumar Dutta 2023-12-13 13:47:02 +00:00
parent 753e6893b2
commit d21b45ac0b
2 changed files with 55 additions and 1 deletions

View file

@ -18,7 +18,8 @@ OPTION(WITH_OPENSSL "build with lib openssl" OFF)
OPTION(WITH_MBEDTLS "build with lib mbedtls" OFF)
IF(NOT WITH_WOLFSSL AND NOT WITH_OPENSSL AND NOT WITH_MBEDTLS)
MESSAGE(FATAL_ERROR "You must enable one of the SSL libraries: {'WOLFSSL','OPENSSL','MBEDTLS'}")
MESSAGE(WARNING "NO SSL library selected: {'WOLFSSL','OPENSSL','MBEDTLS'}, proceeding with OPENSSL")
SET(WITH_OPENSSL ON)
ENDIF()
SET(BBF_DM_SOURCES dmcommon.c)

53
tools/Dockerfile Normal file
View file

@ -0,0 +1,53 @@
FROM ubuntu:22.04
LABEL maintainer="vivek.dutta@iopsys.eu"
LABEL build="docker build -t bbfdm-tools ."
LABEL run="docker run -it --rm -v ${PWD}/..:/builds/bbfdm bbfdm-tools"
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
cmake \
libjson-c-dev \
libssl-dev \
libcurl4-openssl-dev \
pkg-config \
git
RUN mkdir /opt/dev
# libubox
ARG LIBUBOX_VERSION=75a3b870cace1171faf57bd55e5a9a2f1564f757
RUN \
cd /opt/dev && \
git clone https://git.openwrt.org/project/libubox.git && \
cd libubox && mkdir build && cd build && \
git checkout ${LIBUBOX_VERSION} && \
cmake -DBUILD_LUA=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE:String="Release" .. && \
make -j2 && \
make install
# uci
ARG UCI_VERSION=5781664d5087ccc4b5ab58505883231212dbedbc
RUN \
cd /opt/dev && \
git clone https://git.openwrt.org/project/uci.git && \
cd uci && \
git checkout ${UCI_VERSION} && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DBUILD_LUA=OFF . && \
make -j2 && \
make install
# ubus
ARG UBUS_VERSION=f787c97b34894a38b15599886cacbca01271684f
RUN \
cd /opt/dev && \
git clone https://git.openwrt.org/project/ubus.git && \
cd ubus && \
git checkout ${UBUS_VERSION} && \
cmake -DCMAKE_BUILD_TYPE:String="Release" -DBUILD_LUA=OFF -DBUILD_EXAMPLES=OFF . && \
make -j2 && \
make install
ENTRYPOINT ["/bin/bash"]