-
Notifications
You must be signed in to change notification settings - Fork 217
/
Dockerfile
50 lines (45 loc) · 1.57 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
39
40
41
42
43
44
45
46
47
48
49
50
FROM rust:bullseye
ENV INSIDE_DOCKER_CONTAINER=1 \
DEBIAN_FRONTEND=noninteractive \
DEBCONF_NOWARNINGS=yes \
PKG_CONFIG_ALLOW_CROSS=1 \
PKG_CONFIG_PATH="/usr/lib/arm-linux-gnueabihf/pkgconfig" \
PATH="/root/.cargo/bin/:$PATH" \
CARGO_INSTALL_ROOT="/root/.cargo" \
CARGO_TARGET_DIR="/build" \
CARGO_HOME="/build/cache"
RUN mkdir /build \
&& mkdir /.cargo \
&& rustup target add aarch64-unknown-linux-gnu \
&& rustup target add armv7-unknown-linux-gnueabihf \
&& echo '[target.aarch64-unknown-linux-gnu]\nlinker = "aarch64-linux-gnu-gcc"' > /.cargo/config \
&& echo '[target.armv7-unknown-linux-gnueabihf]\nlinker = "arm-linux-gnueabihf-gcc"' >> /.cargo/config \
&& cargo install --jobs "$(nproc)" cargo-deb \
;
RUN dpkg --add-architecture arm64 \
&& dpkg --add-architecture armhf \
&& apt-get update \
&& apt-get -y upgrade \
&& apt-get install -y --no-install-recommends \
build-essential \
libasound2-dev \
libpulse-dev \
crossbuild-essential-arm64 \
libasound2-dev:arm64 \
libpulse-dev:arm64 \
crossbuild-essential-armhf \
libasound2-dev:armhf \
libpulse-dev:armhf \
cmake \
clang-16 \
git \
bc \
dpkg-dev \
liblzma-dev \
pkg-config \
gettext-base \
&& rm -rf /var/lib/apt/lists/* \
;
RUN 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