-
-
Notifications
You must be signed in to change notification settings - Fork 219
/
Copy pathDockerfile.riscv64
43 lines (39 loc) · 1.41 KB
/
Dockerfile.riscv64
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
39
40
41
42
43
# Dedicated riscv64 trixie Dockerfile, until official rust:trixie images are available:
# https://github.com/rust-lang/docker-rust/blob/master/stable/
FROM buildpack-deps:trixie
ENV INSIDE_DOCKER_CONTAINER=1 \
DEBIAN_FRONTEND=noninteractive \
DEBCONF_NOWARNINGS=yes \
PKG_CONFIG_ALLOW_CROSS=1 \
PATH="/root/.cargo/bin/:$PATH" \
CARGO_INSTALL_ROOT="/root/.cargo" \
CARGO_TARGET_DIR="/build" \
CARGO_HOME="/build/cache"
RUN dpkg --add-architecture riscv64 \
&& apt-get update \
&& apt-get -y upgrade \
&& apt-get install -y --no-install-recommends \
build-essential \
libasound2-dev \
libpulse-dev \
crossbuild-essential-riscv64 \
libasound2-dev:riscv64 \
libpulse-dev:riscv64 \
cmake \
clang-19 \
git \
bc \
liblzma-dev \
pkg-config \
gettext-base \
rustup \
&& rm -rf /var/lib/apt/lists/* \
;
RUN mkdir /build /.cargo \
&& rustup toolchain install stable --profile minimal --target riscv64gc-unknown-linux-gnu \
&& echo '[target.riscv64gc-unknown-linux-gnu ]\nlinker = "riscv64-linux-gnu-gcc"' > /.cargo/config.toml \
&& cargo install --jobs "$(nproc)" cargo-deb \
&& cargo install --force --locked --root /usr bindgen-cli \
;
RUN git config --global --add safe.directory /mnt/raspotify \
&& git config --global --add safe.directory /mnt/raspotify/librespot