forked from Spotifyd/spotifyd
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile.aarm64
32 lines (21 loc) · 1.04 KB
/
Dockerfile.aarm64
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
FROM rust:1.66-bullseye as build
ARG BRANCH=master
ENV PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc"
WORKDIR /usr/src/
RUN dpkg --add-architecture arm64 && \
apt-get -yqq update && \
apt-get install --no-install-recommends -yqq gcc-aarch64-linux-gnu libc6-dev-arm64-cross \
libasound2-dev:arm64 libssl-dev:arm64 && \
mkdir -p /usr/src/spotifyd /usr/src/asound2 && \
git clone --branch=${BRANCH} https://github.com/Spotifyd/spotifyd.git
RUN cd spotifyd && \
rustup target add aarch64-unknown-linux-gnu && \
cargo build --target=aarch64-unknown-linux-gnu --release
RUN cd asound2 && \
apt-get download -yqq libasound2:arm64 && \
ar p ./libasound2*_arm64.deb data.tar.xz | tar xJ
FROM arm32v7/debian:buster-slim as release
ENTRYPOINT ["/usr/bin/spotifyd", "--no-daemon"]
COPY --from=build /usr/src/spotifyd/target/aarch64-unknown-linux-gnu/release/spotifyd /usr/bin/
COPY --from=build /usr/src/asound2/usr /usr