We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 35e5256 + a344b64 commit 8b1ba9bCopy full SHA for 8b1ba9b
backwork/Dockerfile
@@ -35,7 +35,17 @@ RUN python -m pip install --upgrade pip
35
RUN pip install setuptools==57.5.0
36
RUN pip install -r ./requirements.txt
37
38
-COPY ./docker-entrypoint.sh /
+# install sudo as root
39
+RUN apk add --no-cache --update sudo
40
+
41
+# add new user
42
+RUN adduser -D myapp \
43
+ && echo "myapp ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/myapp \
44
+ && chmod 0440 /etc/sudoers.d/myapp
45
46
+COPY --chown=myapp ./docker-entrypoint.sh /
47
+RUN mkdir /backups && chown myapp /backups
48
+USER myapp
49
50
VOLUME ["/backups"]
51
ENTRYPOINT ["/sbin/tini", "--"]
0 commit comments