aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2017-06-15 16:15:36 +0200
committerRahiel Kasim <rahielkasim@gmail.com>2017-06-15 16:15:36 +0200
commitcd53495a2b3f29bcdcbf7953bc1b8bc3479bfa64 (patch)
tree86987d792393c930e28db2e9270d1be4a7eedeb1
parent06ca25c2231ea2ca90d3f0c4f2a0bfe61db85c97 (diff)
run the API as an unprivileged user
-rw-r--r--Dockerfile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 96dea20..3890a65 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,4 +21,8 @@ RUN pip3 install -r requirements.txt
EXPOSE 8080
+RUN groupadd -r open_nsfw && useradd --no-log-init -r -g open_nsfw open_nsfw
+
+USER open_nsfw
+
ENTRYPOINT ["python3", "api.py"]