Run in screen and handle graceful shutdown

- Install screen/procps and run in detached session
- Monitor PID and trap signals for clean exit
- Suppress stderr/stdout when running usermod
- Clean up Dockerfile
This commit is contained in:
2024-09-19 23:22:14 -04:00
parent e9399f4344
commit 8fa2d12bc9
2 changed files with 22 additions and 5 deletions

View File

@@ -22,7 +22,6 @@ RUN apt-get update && \
RUN curl -s -o "/tmp/libtorrent-${LIBTORRENT_VERSION}.tar.gz" -L "$LIBTORRENT_URL" && \
FILE_HASH="$(sha256sum /tmp/libtorrent-${LIBTORRENT_VERSION}.tar.gz | cut -d' ' -f1)" && \
echo hey; \
du -sh "/tmp/libtorrent-${LIBTORRENT_VERSION}.tar.gz"; \
if [ ! "$LIBTORRENT_HASH" = "$FILE_HASH" ]; then \
echo "SHA256 verification failed!" && \
@@ -69,7 +68,9 @@ COPY --from=build /tmp/rtorrent.rc.template /tmp/rtorrent.rc.template
RUN apt-get update && \
apt-get install -y \
libcurl4 \
libncursesw6 && \
libncursesw6 \
procps \
screen && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*