mirror of
https://github.com/Dodelidoo-Labs/sonobarr.git
synced 2026-02-20 07:44:14 -05:00
### Added - PUID/PGID environment support to map container UID/GID for host-friendly file ownership. - Documentation and sample env entries explaining UID/GID mapping and startup privilege behavior. - Small in-app help link for the root folder path. - Minimum versions for key HTTP and WSGI libraries to improve compatibility. ### Changed - Entrypoint now handles ownership fixes and privilege drop at runtime instead of enforcing a build-time non-root user. - Contribution guide updated to require PRs, encourage single-feature PRs, and clarify testing/rebuild workflow. ### Security - Pin minimum versions for critical libraries to address compatibility and known vulnerabilities and improve overall security posture.
30 lines
718 B
Docker
30 lines
718 B
Docker
FROM python:3.12-alpine
|
|
|
|
ARG RELEASE_VERSION
|
|
ENV RELEASE_VERSION=${RELEASE_VERSION}
|
|
ENV PYTHONPATH="/sonobarr/src"
|
|
|
|
RUN apk update && apk add --no-cache su-exec \
|
|
&& addgroup -S -g 1000 sonobarr \
|
|
&& adduser -S -G sonobarr -u 1000 sonobarr
|
|
|
|
# Copy only requirements first
|
|
COPY requirements.txt /sonobarr/
|
|
WORKDIR /sonobarr
|
|
|
|
# Install requirements
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
# Now copy the rest of your code
|
|
COPY src/ /sonobarr/src/
|
|
COPY migrations/ /sonobarr/migrations/
|
|
COPY gunicorn_config.py /sonobarr/
|
|
COPY init.sh /sonobarr/
|
|
|
|
RUN chmod 755 init.sh \
|
|
&& mkdir -p /sonobarr/config \
|
|
&& chown -R sonobarr:sonobarr /sonobarr/config
|
|
|
|
ENTRYPOINT ["./init.sh"]
|