airsonic/Containerfile

43 lines
1 KiB
Text
Raw Normal View History

2024-05-27 12:57:20 +02:00
FROM docker.io/alpine:3.20 AS builder
2021-05-08 14:26:27 +02:00
2024-05-27 12:57:20 +02:00
ENV VERSION=11.0.0-SNAPSHOT.20240424015024
2021-05-08 14:26:27 +02:00
RUN apk add --no-cache \
2023-12-14 11:34:26 +01:00
openjdk21-jdk \
2023-09-26 16:15:56 +02:00
maven \
git
2017-10-19 13:48:38 +02:00
2021-05-08 14:26:27 +02:00
RUN git clone https://github.com/airsonic-advanced/airsonic-advanced
2018-05-24 10:41:56 +02:00
2021-05-08 14:26:27 +02:00
WORKDIR /airsonic-advanced
RUN git checkout "$VERSION"
RUN mvn package -DskipTests
2018-05-24 10:41:56 +02:00
2021-05-08 14:26:27 +02:00
2024-05-27 12:57:20 +02:00
FROM docker.io/thallian/confd-env:3.20-3.1.6.2
2021-05-08 14:26:27 +02:00
ENV JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
ENV AIRSONIC_DIR=/home/airsonic
RUN apk add --no-cache \
2023-03-05 11:55:41 +01:00
ca-certificates \
openssl \
ffmpeg \
flac \
opus \
lame \
2023-12-14 11:34:26 +01:00
openjdk21-jre-headless
2021-12-15 07:36:05 +01:00
2017-10-19 13:48:38 +02:00
RUN addgroup -g 2222 airsonic
2021-05-08 14:26:27 +02:00
RUN adduser -h "$AIRSONIC_DIR" -S -D -u 2222 -G airsonic airsonic
2017-10-19 13:48:38 +02:00
2021-05-08 14:36:55 +02:00
COPY --from=builder /airsonic-advanced/airsonic-main/target/airsonic.war "$AIRSONIC_DIR/airsonic.war"
2021-05-08 14:26:27 +02:00
RUN chown -R airsonic:airsonic "$AIRSONIC_DIR"
2017-10-19 13:48:38 +02:00
RUN mkdir -p $AIRSONIC_DIR/data/transcode
2021-05-08 14:26:27 +02:00
RUN ln -s /usr/bin/ffmpeg "$AIRSONIC_DIR/data/transcode/ffmpeg"
2017-10-19 13:48:38 +02:00
ADD /rootfs /
EXPOSE 8080
2021-05-08 14:26:27 +02:00
VOLUME "$AIRSONIC_DIR/data" "$AIRSONIC_DIR/music" "$AIRSONIC_DIR/playlists" "$AIRSONIC_DIR/podcasts"