-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
# Use Navidrome as the base image | ||
FROM deluan/navidrome:latest | ||
|
||
# Create a non-root user | ||
RUN useradd -ms /bin/bash navidromeuser | ||
|
||
# Set the working directory | ||
WORKDIR /home/container | ||
|
||
# Create cache and data directories and set permissions for the user | ||
RUN mkdir -p /home/container/cache /home/container/data /home/container/music \ | ||
&& chown -R navidromeuser:navidromeuser /home/container | ||
|
||
# Expose the default Navidrome port | ||
EXPOSE 4533 | ||
|
||
# Remove any default entrypoint (optional) | ||
# ENTRYPOINT [] | ||
# Set the user for running the container | ||
USER navidromeuser | ||
|
||
# Set the default command to run Navidrome with arguments (this will be overridden in Pterodactyl) | ||
#CMD ["navidrome --max-memory {{SERVER_MEMORY}} -port {{SERVER_PORT}} --music /home/container/music --cache /home/container/cache --data /home/container/data"] | ||
#CMD ["navidrome --help"] | ||
CMD ["navidrome", "--max-memory", "{{SERVER_MEMORY}}", "-port", "{{SERVER_PORT}}", "--music", "/home/container/music", "--cache", "/home/container/cache", "--data", "/home/container/data"] |