ENV LD_PRELOAD="/usr/lib/libjemalloc.so.2"
ENV VIRTUAL_ENV=/opt/venv
-# create mass user (PID 1000, GID 1000)
-RUN addgroup --gid 1000 massgroup && \
- adduser --system --uid 1000 --ingroup massgroup mass && \
- python3 -m venv $VIRTUAL_ENV && \
- chown -R mass:massgroup $VIRTUAL_ENV
+# create venv and set some permissions to allow running the container as non-root
+RUN python3 -m venv $VIRTUAL_ENV && \
+ chmod -R 777 $VIRTUAL_ENV && \
+ chmod -R 777 /tmp
-USER mass
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
-
-WORKDIR /home/mass
+WORKDIR $VIRTUAL_ENV
LABEL \
org.opencontainers.image.title="Music Assistant Base Image" \
+++ /dev/null
-version: "3"
-services:
- music-assistant-server:
- image: ghcr.io/music-assistant/server:beta # <<< Desired release version here (change beta to latest once there is a stable release)
- container_name: music-assistant-server
- restart: unless-stopped
- # Network mode must be set to host for MA to work correctly
- network_mode: host
- volumes:
- - ${USERDIR:-$HOME}/docker/music-assistant-server/data:/data/
- # privileged caps needed to mount smb folders within the container
- cap_add:
- - SYS_ADMIN
- - DAC_READ_SEARCH
- privileged: true
- environment:
- # Provide logging level as environment variable.
- # default=info, possible=(critical, error, warning, info, debug, verbose)
- - LOG_LEVEL=info