feat: improved docker image volumes and permissions (#5160)

This commit is contained in:
Henrique Dias
2025-06-18 21:53:02 +02:00
committed by GitHub
parent 04a13f086f
commit 2e26393a02
14 changed files with 149 additions and 113 deletions

View File

@@ -1,21 +1,23 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.20
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
RUN apk --update add ca-certificates \
mailcap \
curl \
jq
RUN apk update && \
apk --no-cache add ca-certificates mailcap curl jq
COPY healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh # Make the script executable
# Make user and create necessary directories
RUN mkdir -p /config /database /srv && \
chown -R abc:abc /config /database /srv
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD /healthcheck.sh || exit 1
# Copy files and set permissions
COPY filebrowser /bin/filebrowser
COPY docker/common/ /
COPY docker/s6/ /
# copy local files
COPY docker/root/ /
RUN ln -s /config/settings.json /.filebrowser.json
COPY filebrowser /usr/bin/filebrowser
RUN chown -R abc:abc /bin/filebrowser /defaults healthcheck.sh
# ports and volumes
# Define healthcheck script
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s CMD /healthcheck.sh
# Set the volumes and exposed ports
VOLUME /srv /config /database
EXPOSE 80