Skip to content

Commit

Permalink
build: fix broken static link
Browse files Browse the repository at this point in the history
  • Loading branch information
kawaemon committed Feb 5, 2023
1 parent 95e9097 commit 9f730e0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
from rust:slim-buster as base
env NETTLE_STATIC=yes \
CARGO_TERM_PROGRESS_WHEN="always" \
env CARGO_TERM_PROGRESS_WHEN="always" \
CARGO_TERM_PROGRESS_WIDTH="80"
workdir /src

copy rust-toolchain.toml .
run cargo install cargo-chef --locked

# workaround for https://gitlab.com/sequoia-pgp/nettle-sys/-/issues/16
env NETTLE_STATIC=yes \
HOGWEED_STATIC=yes \
GMP_STATIC=yes \
SYSROOT=/dummy

# ---

from base as plan
Expand All @@ -24,9 +29,9 @@ arg FEATURES="discord_client,mongo_db,plot_plotters_static"

run apt-get update \
&& apt-get install -y \
wget unzip clang \
cmake llvm nettle-dev \
pkg-config \
wget unzip clang \
cmake llvm nettle-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*

copy --from=plan /src/download_font.sh .
Expand All @@ -38,7 +43,6 @@ run cargo chef cook \
--release --no-default-features --features ${FEATURES}

copy . .

run cargo build --release --no-default-features --features ${FEATURES}

# ---
Expand Down

0 comments on commit 9f730e0

Please sign in to comment.