aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-25 01:01:01 -0700
committerFuwn <[email protected]>2022-04-25 01:01:01 -0700
commitca5fb1fe6507996a7a5c1dc78a82767e38abb3a9 (patch)
treeb5af9ee551317426233270e62c211dbf82e666bd /Dockerfile
parentchore: ignore fleet (diff)
downloadlocus-ca5fb1fe6507996a7a5c1dc78a82767e38abb3a9.tar.xz
locus-ca5fb1fe6507996a7a5c1dc78a82767e38abb3a9.zip
ci(docker): build with fleet
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index e41c90b..189fe6f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -9,6 +9,16 @@ RUN curl "https://static.rust-lang.org/rustup/archive/${RUSTUP_VER}/${RUST_ARCH}
&& ~/.cargo/bin/rustup target add x86_64-unknown-linux-musl \
&& echo "[build]\ntarget = \"x86_64-unknown-linux-musl\"" > ~/.cargo/config
+RUN cargo install sccache
+
+# RUN apt-get update && apt-get install clang-3.9 -y
+
+RUN curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
+ && apt-get update \
+ && apt-get install -y clang
+
+RUN cargo install --git https://github.com/dimensionhq/fleet fleet-rs
+
FROM environment as builder
WORKDIR /usr/src
@@ -19,13 +29,13 @@ WORKDIR /usr/src/locus
COPY Cargo.* .
-RUN cargo build --release
+RUN fleet build --release
COPY . .
RUN --mount=type=cache,target=/usr/src/locus/target \
--mount=type=cache,target=/root/.cargo/registry \
- cargo build --release --bin locus \
+ fleet build --release --bin locus \
&& strip -s /usr/src/locus/target/x86_64-unknown-linux-musl/release/locus \
&& mv /usr/src/locus/target/x86_64-unknown-linux-musl/release/locus .