-
Notifications
You must be signed in to change notification settings - Fork 49
/
Dockerfile
29 lines (21 loc) · 1001 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM rustlang/rust:nightly-alpine
ENV CARGO_UNSTABLE_SPARSE_REGISTRY=true
RUN rustup set profile minimal && \
rustup default nightly-2023-08-25-x86_64-unknown-linux-musl && \
rustup toolchain uninstall nightly && \
rustup toolchain uninstall stable && \
rustup component add --toolchain nightly-2023-08-25 \
--target x86_64-unknown-linux-musl \
rust-src rustc-dev llvm-tools-preview miri
RUN apk add --no-cache build-base musl-dev libc-dev linux-headers
WORKDIR /aquascope
COPY Cargo.toml Cargo.lock rust-toolchain.toml ./
COPY crates ./crates
ENV TARGET_CC=x86_64-linux-musl-gcc
ENV RUSTFLAGS="-C target-feature=-crt-static"
RUN cargo miri setup
ENV MIRI_SYSROOT=/root/.cache/miri
RUN cargo install --path crates/aquascope_front --target x86_64-unknown-linux-musl --locked
RUN cargo clean
RUN rm -rf /aquascope
WORKDIR /app