Skip to content

Commit

Permalink
Workaround for rust/cargo cross-compiling under buildx (see: rust-lan…
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfb committed Dec 2, 2022
1 parent 22d45ca commit 17f8033
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM ubuntu:jammy

RUN apt-get update && apt-get install -y wget cargo pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y curl wget build-essential pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup toolchain install nightly
ADD "https://github.com/lovasoa/dezoomify-rs/archive/refs/tags/v2.9.4.tar.gz" /dezoomify-rs-linux.tgz
ADD ./bl-dl.sh /usr/local/bin/bl-dl
RUN tar xzvf dezoomify-rs-linux.tgz && cd /dezoomify-rs-2.9.4 && cargo build --release && mv -v target/release/dezoomify-rs /usr/local/bin/ && cd / && rm -rf dezoomify-rs-2.9.4 dezoomify-rs-linux.tgz && chmod a+x /usr/local/bin/bl-dl && rm -rf ~/.cargo
RUN tar xzvf dezoomify-rs-linux.tgz && cd /dezoomify-rs-2.9.4 && cargo +nightly build --release -Z sparse-registry && mv -v target/release/dezoomify-rs /usr/local/bin/ && cd / && rm -rf dezoomify-rs-2.9.4 dezoomify-rs-linux.tgz && chmod a+x /usr/local/bin/bl-dl && rm -rf ~/.cargo
VOLUME /data
WORKDIR /data
ENTRYPOINT ["bl-dl"]

0 comments on commit 17f8033

Please sign in to comment.