forked from dart-lang/dart_style
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (20 loc) · 829 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
# https://www.docker.com/blog/cross-compiling-rust-code-for-multiple-architectures/
FROM rust:latest
RUN apt update; apt upgrade -y
RUN apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross
# RUN rustup target add aarch64-unknown-linux-gnu
# RUN rustup target add x86_64-apple-darwin
# RUN rustup target add aarch64-apple-darwin
# RUN rustup target add x86_64-unknown-linux-gnu
# RUN rustup toolchain install stable-aarch64-unknown-linux-gnu
# RUN rustup toolchain install stable-aarch64-apple-darwin
WORKDIR /app
COPY src src
COPY Cargo.lock .
COPY Cargo.toml .
#CMD ["cargo", "build", "--target", "aarch64-unknown-linux-gnu"]
#CMD ["cargo","build","--release"]
#RUN cargo build --target=aarch64-apple-darwin
RUN cargo build --release
RUN ls target/release
#CMD ["cargo","build","--release","--all-targets"]