updated to include a automatic restart script
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -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" ]
|
||||
|
||||
Reference in New Issue
Block a user