-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
38 lines (31 loc) · 1.27 KB
/
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
30
31
32
33
34
35
36
37
38
FROM tinyverseml/runecoral-cross-linux-x86_64 as build
WORKDIR /app
# Putting the toolchain file in / means we always use the right rustc version
COPY rust-toolchain.toml /rust-toolchain.toml
COPY . /app/
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh && \
sh rustup-init.sh --default-toolchain none -y && \
. ~/.cargo/env && \
rustup component add rustfmt && \
rustup show && \
cargo fetch && \
cargo install --debug bindgen && \
# Install Rune
cargo install --root / --path /app/crates/rune-cli --locked --verbose && \
rune version --verbose && \
# Delete any bulky dependencies installed with Rune
rm -rf target $CARGO_HOME/git $CARGO_HOME/registry
FROM debian:latest
WORKDIR /app
COPY --from=build /bin/rune /usr/local/bin/rune
# Putting the toolchain file in / means we always use the right rustc version
COPY rust-toolchain.toml /rust-toolchain.toml
ENV PATH="/root/.cargo/bin:${PATH}"
RUN apt-get update -y && \
apt-get install -y curl build-essential git && \
rm -rf /var/lib/apt/lists/* && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh && \
sh rustup-init.sh --default-toolchain none -y && \
rustup component add rustfmt && \
rustup show
CMD [ "rune" ]