Skip to content

Commit

Permalink
Add QNAP support to linux builder docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
lcruz99 committed Oct 25, 2024
1 parent 181a242 commit 7ae015a
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion builders/build-linux-rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down Expand Up @@ -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/

0 comments on commit 7ae015a

Please sign in to comment.