updated to include a automatic restart script

This commit is contained in:
2023-11-07 18:19:27 +01:00
parent 4b6be075c1
commit 621e51c7cd
6 changed files with 169 additions and 8 deletions

View File

@@ -1,16 +1,22 @@
FROM --platform=$BUILDPLATFORM debian:bullseye-slim as build
FROM --platform=$BUILDPLATFORM golang:1-bullseye as build
ENV SPOTIFYD_VERSION=v0.3.5
ENV URL=https://github.com/Spotifyd/spotifyd/releases/download/${SPOTIFYD_VERSION}/spotifyd-linux-armhf-full.tar.gz
RUN apt-get update && \
apt-get install -yqq --no-install-recommends ca-certificates wget
apt-get install -yqq --no-install-recommends ca-certificates wget
RUN wget ${URL} -O - | tar -xz && chmod +x /spotifyd
WORKDIR /
RUN wget ${URL} -O - | tar -xz && chmod +x spotifyd
COPY main.go /main.go
RUN GOARCH=arm go build -o /runner /main.go
FROM --platform=$TARGETPLATFORM debian:bullseye-slim
COPY --from=build /spotifyd /app/spotifyd
COPY --from=build /runner /app/runner
COPY start.sh /app/start.sh
RUN apt-get update && \
@@ -22,4 +28,4 @@ RUN apt-get update && \
USER spotifyd
WORKDIR /app
ENTRYPOINT [ "/app/start.sh" ]
ENTRYPOINT [ "/app/runner" ]