From b1ed876ced9d971902f886c08de4b857e6fff41c Mon Sep 17 00:00:00 2001
From: Janne Mareike Koschinski <janne@kuschku.de>
Date: Wed, 8 Jun 2022 21:55:17 +0200
Subject: [PATCH] fix: correct issues with dockerfile

---
 daemon/Dockerfile | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/daemon/Dockerfile b/daemon/Dockerfile
index e295d0c..c6e3f28 100644
--- a/daemon/Dockerfile
+++ b/daemon/Dockerfile
@@ -51,6 +51,16 @@ RUN apk add --no-cache \
 COPY --from=builder /build/usr/bin/rtorrent /usr/bin/rtorrent
 COPY --from=builder /build/usr/lib/libtorrent.so* /usr/lib/
 
+RUN adduser -u 1000 -D rtorrent && \
+    addgroup rtorrent rtorrent && \
+    mkdir -p /data && chown rtorrent /data && \
+    mkdir -p /private && chown rtorrent /private
+
+USER rtorrent
+
+COPY src/rtorrent.rc /rtorrent.rc
+COPY entrypoint.sh /entrypoint.sh
+
 ENV RT_TRACKER_UDP="yes"
 ENV RT_DHT_MODE="disable"
 ENV RT_DHT_PORT=49160
@@ -67,16 +77,6 @@ ENV RT_DAEMON="true"
 ENV RT_XMLRPC_BIND="0.0.0.0"
 ENV RT_XMLRPC_PORT="5000"
 
-RUN adduser -u 1000 -D rtorrent && \
-    addgroup rtorrent rtorrent && \
-    mkdir /data && chown rtorrent /data && \
-    mkdir /private && chown rtorrent /private
-
-USER rtorrent
-
-COPY src/rtorrent.rc /rtorrent.rc
-COPY entrypoint.sh /entrypoint.sh
-
 VOLUME ["/data"]
 VOLUME ["/tmp"]
 
-- 
GitLab