-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
15 lines (15 loc) · 854 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# To make Decay compatible with differnt linux distributions,
# let's cross-compile using musl so the binary is statically linked with the right dependencies
# See: https://users.rust-lang.org/t/unable-to-run-compiled-program/88441/5
# See: https://github.com/rust-cross/rust-musl-cross
# See: https://hub.docker.com/layers/messense/rust-musl-cross/x86_64-musl/images/sha256-7ef452f6c731535a716e3f5a5d255fbe9720f35e992c9dee7d477e58542cfaf5?context=explore
FROM messense/rust-musl-cross@sha256:7ef452f6c731535a716e3f5a5d255fbe9720f35e992c9dee7d477e58542cfaf5 as builder
WORKDIR /app
COPY . /app
# See: https://github.com/rust-lang/rustup/issues/1167#issuecomment-367061388
RUN rm -frv ~/.rustup/toolchains/*
RUN rustup show \
&& rustup update \
&& rustup target add x86_64-unknown-linux-musl \
&& rustc --version
RUN cargo build --verbose --release