diff --git a/Containerfile b/Containerfile index d778eb8..cc73087 100644 --- a/Containerfile +++ b/Containerfile @@ -8,7 +8,8 @@ ARG BASE_VERSION=15 FROM ghcr.io/daemonless/base:${BASE_VERSION} ARG FREEBSD_ARCH=amd64 -ARG PACKAGES="navidrome ffmpeg-nox11" +ARG PKG_NAME="navidrome" +ARG PACKAGES="${PKG_NAME} ffmpeg-nox11" ARG APP_VERSION="latest" LABEL org.opencontainers.image.title="Navidrome" \ @@ -21,6 +22,7 @@ LABEL org.opencontainers.image.title="Navidrome" \ io.daemonless.category="Media Servers" \ io.daemonless.port="4533" \ io.daemonless.arch="${FREEBSD_ARCH}" \ + io.daemonless.pkg-name="${PKG_NAME}" \ io.daemonless.packages="${PACKAGES}" @@ -32,7 +34,7 @@ RUN pkg update && \ # Download and install navidrome RUN mkdir -p /app && \ - NAVIDROME_VERSION=$(pkg query -e %n=navidrome %v) && \ + NAVIDROME_VERSION=$(pkg query -e %n=${PKG_NAME} %v) && \ echo "${NAVIDROME_VERSION}" > /app/version # Copy root filesystem @@ -45,4 +47,4 @@ RUN chmod +x /etc/services.d/navidrome/run /healthz EXPOSE 4533 # Volumes -VOLUME /config +VOLUME /config \ No newline at end of file diff --git a/Containerfile.j2 b/Containerfile.j2 index 60aa07a..17be6ca 100644 --- a/Containerfile.j2 +++ b/Containerfile.j2 @@ -2,7 +2,8 @@ ARG BASE_VERSION=15 FROM ghcr.io/daemonless/base:${BASE_VERSION} ARG FREEBSD_ARCH=amd64 -ARG PACKAGES="navidrome ffmpeg-nox11" +ARG PKG_NAME="navidrome" +ARG PACKAGES="${PKG_NAME} ffmpeg-nox11" ARG APP_VERSION="latest" LABEL org.opencontainers.image.title="Navidrome" \ @@ -15,6 +16,7 @@ LABEL org.opencontainers.image.title="Navidrome" \ io.daemonless.category="Media Servers" \ io.daemonless.port="4533" \ io.daemonless.arch="${FREEBSD_ARCH}" \ + io.daemonless.pkg-name="${PKG_NAME}" \ io.daemonless.packages="${PACKAGES}" @@ -25,7 +27,8 @@ RUN pkg update && \ rm -rf /var/cache/pkg/* /var/db/pkg/repos/* # Download and install navidrome -RUN NAVIDROME_VERSION=$(pkg query -e %n=navidrome %v) && \ +RUN mkdir -p /app && \ + NAVIDROME_VERSION=$(pkg query -e %n=${PKG_NAME} %v) && \ echo "${NAVIDROME_VERSION}" > /app/version # Copy root filesystem diff --git a/README.md b/README.md index c6e3dab..9598bb1 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,11 @@ Modern Music Server and Streamer compatible with Subsonic/Airsonic. | **Website** | [https://www.navidrome.org/](https://www.navidrome.org/) | ## Version Tags - | Tag | Description | Best For | | :--- | :--- | :--- | | `latest` | **Upstream Binary**. Built from official release. | Most users. Matches Linux Docker behavior. | ## Prerequisites - Before deploying, ensure your host environment is ready. See the [Quick Start Guide](https://daemonless.io/guides/quick-start) for host setup instructions. ## Deployment @@ -51,7 +49,6 @@ services: ``` ### AppJail Director - **.env**: ``` @@ -100,7 +97,7 @@ volumes: **Makejail**: ``` -# Makejail +# Makejail ARG tag=latest @@ -195,6 +192,9 @@ Access at: `http://localhost:4533` ## First run +If no configuration file exists when the container starts, it will generate an initial default +config file at `/config/config.toml`. + **Architectures:** amd64 **User:** `bsd` (UID/GID via PUID/PGID, defaults to 1000:1000)