From b998b9bc3f79b5ca1276aa29cc491d5003f4479c Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Thu, 9 Jul 2020 20:24:28 +0200 Subject: [PATCH] Switch to alpine --- Dockerfile | 18 ++++++++---------- entrypoint.sh | 2 +- nginx.conf | 4 +++- services/deluge-web/run | 2 +- services/deluge_exporter/run | 2 +- services/deluged/run | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9aa31d6..806a771 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,13 @@ -FROM debian:testing-slim +FROM alpine:edge -RUN apt-get update \ - && apt-get -y install --no-install-recommends runit \ - && apt-get -y install \ - deluge-console \ - deluge-web \ - deluged \ +RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories \ + && apk add --no-cache \ + deluge \ git \ - gosu \ - nginx-light \ - python3-pip \ + nginx \ + py3-pip \ + runit \ + su-exec \ tini RUN git clone --depth=1 https://github.com/tobbez/deluge_exporter /opt/deluge_exporter \ diff --git a/entrypoint.sh b/entrypoint.sh index 4e0ee4b..874699b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,5 @@ #!/bin/sh set -u -adduser -q --gecos '' --disabled-password --uid $PUID deluge +adduser -D -u $PUID deluge chown deluge:deluge /download/ /config/ exec tini -- runsvdir /etc/service/ diff --git a/nginx.conf b/nginx.conf index 49aded7..aad5af7 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,5 +1,5 @@ # vim: set et sts=4 sw=4 ts=4: -user www-data; +user nginx; worker_processes auto; pid /run/nginx.pid; @@ -20,6 +20,8 @@ http { default_type application/octet-stream; client_max_body_size 32M; + client_body_buffer_size 32M; + proxy_max_temp_file_size 0; server { listen unix:/var/run/nginx.sock; diff --git a/services/deluge-web/run b/services/deluge-web/run index 8ca9db2..a58e74d 100755 --- a/services/deluge-web/run +++ b/services/deluge-web/run @@ -1,2 +1,2 @@ #!/bin/sh -gosu deluge deluge-web -d -c /config +su-exec deluge deluge-web -d -c /config diff --git a/services/deluge_exporter/run b/services/deluge_exporter/run index e65d5bd..6d3c25a 100755 --- a/services/deluge_exporter/run +++ b/services/deluge_exporter/run @@ -1,2 +1,2 @@ #!/bin/sh -DELUGE_CONFIG_DIR=/config/ gosu deluge /opt/deluge_exporter/deluge_exporter.py +DELUGE_CONFIG_DIR=/config/ su-exec deluge /opt/deluge_exporter/deluge_exporter.py diff --git a/services/deluged/run b/services/deluged/run index 9f800fc..01d4f61 100755 --- a/services/deluged/run +++ b/services/deluged/run @@ -1,2 +1,2 @@ #!/bin/sh -gosu deluge deluged -d -c /config +su-exec deluge deluged -d -c /config