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