Add prof of concept none pivilage execution

Use 'DS_PORT' env to use custom https port
  sudo docker run -e DS_PORT=1234 -itd -p80:1234  \
  onlyoffice/documentserver
This commit is contained in:
Alexey Golubev 2020-01-13 15:22:54 +03:00
parent 8e1a52566f
commit 862fbd41d4
5 changed files with 277 additions and 7 deletions

View file

@ -30,8 +30,8 @@ DESC=supervisor
test -x $DAEMON || exit 0
LOGDIR=/var/log/supervisor
PIDFILE=/var/run/$NAME.pid
LOGDIR=/tmp
PIDFILE=/tmp/$NAME.pid
PS_COUNT=0
DODTIME=5 # Time to wait for the server to die, in seconds
# If this value is set too low you might not
@ -101,7 +101,7 @@ case "$1" in
rm -f "$PIDFILE"
fi
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile $PIDFILE \
start-stop-daemon --start --quiet --chuid ds:ds --pidfile $PIDFILE \
--startas $DAEMON -- $DAEMON_OPTS
test -f $PIDFILE || sleep 1
if running ; then
@ -152,7 +152,7 @@ case "$1" in
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n "$DODTIME" ] && sleep $DODTIME
start-stop-daemon --start --quiet --pidfile $PIDFILE \
start-stop-daemon --start --quiet --chuid ds:ds --pidfile $PIDFILE \
--startas $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;

View file

@ -4,9 +4,9 @@
port = 127.0.0.1:9001
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/tmp/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP)
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be