airsonic/Dockerfile

42 lines
1.0 KiB
Docker
Raw Normal View History

2021-05-08 12:26:27 +00:00
FROM alpine:3.13 AS builder
ENV VERSION=11.0.0-SNAPSHOT.20210504201650
ENV SHA256_SUM=25e030eedcd556a48da4dc83e56bb7ee5e621744f974a2e3f0fa8201c04502dd
RUN apk add --no-cache \
openjdk11-jdk \
maven \
git
2017-10-19 11:48:38 +00:00
2021-05-08 12:26:27 +00:00
RUN git clone https://github.com/airsonic-advanced/airsonic-advanced
2018-05-24 08:41:56 +00:00
2021-05-08 12:26:27 +00:00
WORKDIR /airsonic-advanced
RUN git checkout "$VERSION"
RUN mvn package
2018-05-24 08:41:56 +00:00
2021-05-08 12:26:27 +00:00
FROM thallian/alpine-s6:latest
ENV JAVA_OPTIONS=-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
ENV AIRSONIC_DIR=/home/airsonic
RUN apk add --no-cache \
openjdk11-jre-headless \
ffmpeg \
flac \
opus \
lame
2017-10-19 11:48:38 +00:00
RUN addgroup -g 2222 airsonic
2021-05-08 12:26:27 +00:00
RUN adduser -h "$AIRSONIC_DIR" -S -D -u 2222 -G airsonic airsonic
2017-10-19 11:48:38 +00:00
2021-05-08 12:36:55 +00:00
COPY --from=builder /airsonic-advanced/airsonic-main/target/airsonic.war "$AIRSONIC_DIR/airsonic.war"
2021-05-08 12:26:27 +00:00
RUN chown -R airsonic:airsonic "$AIRSONIC_DIR"
2017-10-19 11:48:38 +00:00
RUN mkdir -p $AIRSONIC_DIR/data/transcode
2021-05-08 12:26:27 +00:00
RUN ln -s /usr/bin/ffmpeg "$AIRSONIC_DIR/data/transcode/ffmpeg"
2017-10-19 11:48:38 +00:00
ADD /rootfs /
EXPOSE 8080
2021-05-08 12:26:27 +00:00
VOLUME "$AIRSONIC_DIR/data" "$AIRSONIC_DIR/music" "$AIRSONIC_DIR/playlists" "$AIRSONIC_DIR/podcasts"