|
| 1 | +FROM ubuntu:24.04 |
| 2 | + |
| 3 | +ENV DEBIAN_FRONTEND=noninteractive |
| 4 | + |
| 5 | +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ |
| 6 | + build-essential ca-certificates \ |
| 7 | + cmake pkg-config clang-format \ |
| 8 | + libboost-all-dev \ |
| 9 | + curl wget git \ |
| 10 | + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* |
| 11 | + |
| 12 | +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ |
| 13 | + libcurl4-openssl-dev \ |
| 14 | + jq netcat-openbsd \ |
| 15 | + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* |
| 16 | + |
| 17 | +ARG NODE_VERSION="24.11.0" |
| 18 | +ENV NVM_DIR="/usr/local/nvm" |
| 19 | +RUN mkdir -p $NVM_DIR |
| 20 | +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash |
| 21 | +RUN /bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION && nvm use --delete-prefix $NODE_VERSION" |
| 22 | +ENV NODE_PATH="$NVM_DIR/versions/node/$NODE_VERSION/lib/node_modules" |
| 23 | +ENV PATH="$NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH" |
| 24 | + |
| 25 | +RUN mkdir -p /deps |
| 26 | + |
| 27 | +ARG DEPS_GOOGLETEST_V="1.15.2" |
| 28 | +RUN cd /deps \ |
| 29 | + && dir="googletest-${DEPS_GOOGLETEST_V}" \ |
| 30 | + && curl -sL https://github.com/google/googletest/releases/download/v${DEPS_GOOGLETEST_V}/$dir.tar.gz | tar xzf - \ |
| 31 | + && cmake -B "build/$dir" \ |
| 32 | + -DCMAKE_BUILD_TYPE=Release \ |
| 33 | + -DBUILD_SHARED_LIBS=ON \ |
| 34 | + "$dir" \ |
| 35 | + && cmake --build "build/$dir" --target install \ |
| 36 | + && rm -rf "build/$dir" "$dir" |
| 37 | + |
| 38 | +ARG DEPS_NLOHMANN_JSON_V="3.11.3" |
| 39 | +RUN cd /deps \ |
| 40 | + && dir="nlohmann-json-${DEPS_NLOHMANN_JSON_V}" \ |
| 41 | + && git clone --depth 1 --branch "v${DEPS_NLOHMANN_JSON_V}" "https://github.com/nlohmann/json" "$dir" \ |
| 42 | + && cmake -B "build/$dir" \ |
| 43 | + -DCMAKE_BUILD_TYPE=Release \ |
| 44 | + -DBUILD_SHARED_LIBS=ON \ |
| 45 | + -DJSON_BuildTests=OFF \ |
| 46 | + "$dir" \ |
| 47 | + && cmake --build "build/$dir" --target install \ |
| 48 | + && rm -rf "build/$dir" "$dir" |
| 49 | + |
| 50 | +ARG DEPS_JSON_SCHEMA_VALIDATOR_V="2.3.0" |
| 51 | +RUN cd /deps \ |
| 52 | + && dir="json-schema-validator-${DEPS_JSON_SCHEMA_VALIDATOR_V}" \ |
| 53 | + && curl -sL https://github.com/pboettch/json-schema-validator/archive/refs/tags/${DEPS_JSON_SCHEMA_VALIDATOR_V}.tar.gz | tar xzf - \ |
| 54 | + && cmake -B "build/$dir" \ |
| 55 | + -DCMAKE_BUILD_TYPE=Release \ |
| 56 | + -DBUILD_SHARED_LIBS=ON \ |
| 57 | + -DJSON_VALIDATOR_BUILD_TESTS=OFF \ |
| 58 | + -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF \ |
| 59 | + "$dir" \ |
| 60 | + && cmake --build "build/$dir" --target install \ |
| 61 | + && rm -rf "build/$dir" "$dir" |
| 62 | + |
| 63 | +ARG DEPS_WEBSOCKETPP_V="0.8.2" |
| 64 | +RUN cd /deps \ |
| 65 | + && dir="websocketpp-${DEPS_WEBSOCKETPP_V}" \ |
| 66 | + && curl -sL https://github.com/zaphoyd/websocketpp/archive/refs/tags/${DEPS_WEBSOCKETPP_V}.tar.gz | tar xzf - \ |
| 67 | + && cmake -B "build/$dir" \ |
| 68 | + -DCMAKE_BUILD_TYPE=Release \ |
| 69 | + -DBUILD_SHARED_LIBS=ON \ |
| 70 | + -DBUILD_TESTS=OFF \ |
| 71 | + -DBUILD_EXAMPLES=OFF \ |
| 72 | + "$dir" \ |
| 73 | + && cmake --build "build/$dir" --target install \ |
| 74 | + && rm -rf "build/$dir" "$dir" |
| 75 | + |
| 76 | +RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \ |
| 77 | + python3-pip \ |
| 78 | + && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* |
| 79 | + |
| 80 | +RUN pip install --break-system-packages gcovr |
| 81 | + |
| 82 | +# --- Transport should be always at the very end as it changes most often |
| 83 | +ARG DEPS_TRANSPORT_V |
| 84 | +RUN cd /deps \ |
| 85 | + && dir="firebolt-native-transport-${DEPS_TRANSPORT_V}" \ |
| 86 | + && curl -sL https://github.com/rdkcentral/firebolt-native-transport/releases/download/v${DEPS_TRANSPORT_V}/firebolt-native-transport-${DEPS_TRANSPORT_V}.tar.gz | tar xzf - \ |
| 87 | + && cmake -B "build/$dir" \ |
| 88 | + -DCMAKE_BUILD_TYPE=Release \ |
| 89 | + -DBUILD_SHARED_LIBS=ON \ |
| 90 | + "$dir" \ |
| 91 | + && cmake --build "build/$dir" --target install \ |
| 92 | + && rm -rf "build/$dir" "$dir" |
| 93 | + |
| 94 | +WORKDIR /workspace |
| 95 | + |
| 96 | +CMD ["/bin/bash"] |
0 commit comments