- Jump into the initialized track lookup loop before checking deletion state. - Apply the binary fix at image build time and remove the concurrent cleaner.
20 lines
874 B
Docker
Executable File
20 lines
874 B
Docker
Executable File
FROM python:3.11-slim-bookworm AS patcher
|
|
|
|
COPY patch_sondibd.py /patch/
|
|
COPY bin/sondibd /patch/sondibd
|
|
RUN python3 /patch/patch_sondibd.py /patch/sondibd
|
|
|
|
FROM debian:bookworm-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends libc6 util-linux passwd && rm -rf /var/lib/apt/lists/* && useradd --system --uid 10010 --user-group --home-dir /data --shell /usr/sbin/nologin sondib && mkdir -p /data/uploads && chown -R 10010:10010 /data
|
|
|
|
WORKDIR /app
|
|
COPY bin/ /app/bin/
|
|
COPY --from=patcher /patch/sondibd /app/bin/sondibd
|
|
RUN chmod 0755 /app/bin/*
|
|
|
|
WORKDIR /data
|
|
EXPOSE 7777
|
|
|
|
ENTRYPOINT ["/bin/sh", "-c", "mkdir -p /data/uploads && chown -R sondib:sondib /data && trap 'exit 0' TERM INT; while :; do setpriv --reuid=sondib --regid=sondib --clear-groups /app/bin/sondibd; rc=$?; echo \"sondibd exited with code $rc; restarting in 1s\" >&2; sleep 1; done"]
|