From 7ae015a9add8c692c72bf65cee29e468152f5f6e Mon Sep 17 00:00:00 2001 From: Luis Cruz Date: Fri, 25 Oct 2024 14:15:47 +0100 Subject: [PATCH] Add QNAP support to linux builder docker image --- builders/build-linux-rust/Dockerfile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/builders/build-linux-rust/Dockerfile b/builders/build-linux-rust/Dockerfile index a29c59f..f828945 100644 --- a/builders/build-linux-rust/Dockerfile +++ b/builders/build-linux-rust/Dockerfile @@ -12,6 +12,9 @@ COPY --from=ghcr.io/nordsecurity/uniffi-generators:v0.25.0-8 /bin/uniffi-bindgen COPY --from=ghcr.io/nordsecurity/uniffi-generators:v0.25.0-8 /bin/uniffi-bindgen-go /bin COPY --from=ghcr.io/nordsecurity/uniffi-generators:v0.25.0-8 /bin/uniffi-bindgen-cpp /bin +ENV QDK_TAG=v2.3.14 +ENV SCCACHE_TAG=0.4.2 + # Multilib is not present in an arm64 debian but is used by libtelio RUN set -eux; \ export DEBIAN_FRONTEND=noninteractive; \ @@ -55,4 +58,24 @@ RUN rustup component add clippy rustfmt RUN cargo search --limit 1 # Install `sccache` -RUN cargo install sccache --version 0.4.2 +RUN cargo install sccache --version "${SCCACHE_TAG}" + +# Install QDK framework for QNAP packages (QPKG) +RUN set -eux; \ + export DEBIAN_FRONTEND=noninteractive; \ + git clone https://github.com/qnap-dev/QDK.git --branch "${QDK_TAG}"; \ + cd QDK; \ + ./InstallToUbuntu.sh install + +# Cleanup +RUN set -eux; \ + export DEBIAN_FRONTEND=noninteractive; \ + apt-get remove --purge -yq; \ + apt-get autoclean -y; \ + apt-get autoremove -y; \ + rm -rf QDK; \ + rm -rf /var/lib/{cache,log}/; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/* /var/tmp/*; \ + rm -rf /usr/share/doc/; \ + rm -rf /usr/share/man/ \ No newline at end of file