2022-09-06 22:33:07 -04:00
|
|
|
FROM casjaysdevdocker/alpine:latest as build
|
|
|
|
|
2022-09-07 01:06:04 -04:00
|
|
|
ARG alpine_version=edge
|
|
|
|
|
2022-09-06 22:33:07 -04:00
|
|
|
ARG LICENSE=WTFPL \
|
2022-09-30 17:56:19 -04:00
|
|
|
IMAGE_NAME=navidrome \
|
2022-09-06 22:33:07 -04:00
|
|
|
TIMEZONE=America/New_York \
|
2022-09-10 16:05:13 -04:00
|
|
|
PORT=80
|
2022-09-06 22:33:07 -04:00
|
|
|
|
|
|
|
ENV SHELL=/bin/bash \
|
|
|
|
TERM=xterm-256color \
|
|
|
|
HOSTNAME=${HOSTNAME:-casjaysdev-$IMAGE_NAME} \
|
|
|
|
TZ=$TIMEZONE
|
|
|
|
|
|
|
|
RUN mkdir -p /bin/ /config/ /data/ && \
|
2022-09-06 23:21:38 -04:00
|
|
|
rm -Rf /bin/.gitkeep /config/.gitkeep /config/*/.gitkeep /data/.gitkeep /data/*/.gitkeep /etc/apk/repositories && \
|
2022-09-07 01:06:04 -04:00
|
|
|
echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/main" >> /etc/apk/repositories && \
|
|
|
|
echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/community" >> /etc/apk/repositories && \
|
|
|
|
echo "http://dl-cdn.alpinelinux.org/alpine/$alpine_version/testing" >> /etc/apk/repositories && \
|
2022-09-06 22:33:07 -04:00
|
|
|
apk update -U --no-cache && \
|
2022-09-10 16:05:13 -04:00
|
|
|
apk add --no-cache mpd mpc navidrome && \
|
|
|
|
rm -Rf /etc/mpd.conf
|
2022-09-06 22:33:07 -04:00
|
|
|
|
|
|
|
COPY ./bin/. /usr/local/bin/
|
2022-09-07 00:33:05 -04:00
|
|
|
COPY ./config/. /etc/
|
2022-09-06 22:33:07 -04:00
|
|
|
COPY ./data/. /data/
|
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
|
|
|
|
|
2022-09-30 17:56:19 -04:00
|
|
|
LABEL org.label-schema.name="navidrome" \
|
|
|
|
org.label-schema.description="Containerized version of navidrome" \
|
|
|
|
org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/navidrome" \
|
|
|
|
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/navidrome" \
|
2022-09-06 22:33:07 -04:00
|
|
|
org.label-schema.build-date=$BUILD_DATE \
|
|
|
|
org.label-schema.version=$BUILD_DATE \
|
|
|
|
org.label-schema.vcs-ref=$BUILD_DATE \
|
|
|
|
org.label-schema.license="$LICENSE" \
|
|
|
|
org.label-schema.vcs-type="Git" \
|
|
|
|
org.label-schema.schema-version="latest" \
|
|
|
|
org.label-schema.vendor="CasjaysDev" \
|
|
|
|
maintainer="CasjaysDev <docker-admin@casjaysdev.com>"
|
|
|
|
|
|
|
|
ENV SHELL="/bin/bash" \
|
|
|
|
TERM="xterm-256color" \
|
2022-09-30 17:56:19 -04:00
|
|
|
HOSTNAME="casjaysdev-navidrome" \
|
2022-09-06 22:33:07 -04:00
|
|
|
TZ="${TZ:-America/New_York}"
|
|
|
|
|
|
|
|
WORKDIR /root
|
|
|
|
|
|
|
|
VOLUME ["/config","/data"]
|
|
|
|
|
|
|
|
EXPOSE $PORT
|
|
|
|
|
|
|
|
COPY --from=build /. /
|
|
|
|
|
|
|
|
ENTRYPOINT [ "tini", "--" ]
|
2022-10-07 18:47:44 -04:00
|
|
|
HEALTHCHECK --interval=15s --timeout=3s CMD [ "/usr/local/bin/entrypoint-navidrome.sh", "healthcheck" ]
|
2022-09-30 17:56:19 -04:00
|
|
|
CMD [ "/usr/local/bin/entrypoint-navidrome.sh" ]
|