File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ RUN if [ "$BUILD_ENV" = "rex" ]; then echo "Change depends" \
1717 && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
1818 ; fi
1919
20- COPY docker /app
2120COPY requirements.d /app/requirements.d
21+ COPY entrypoint.sh /app/entrypoint.sh
2222
2323RUN \
2424 # install python build depends ---
@@ -35,16 +35,15 @@ RUN \
3535 # LDAP client's depends ---
3636 && apk add --no-cache libldap libsasl krb5-libs \
3737 # create non-root user ---
38- && apk add --no-cache shadow su-exec \
39- && addgroup -S -g $GID runner \
40- && adduser -S -D -G runner -u $UID -s /bin/sh runner \
38+ && apk add --no-cache su-exec \
4139 # support timezone ---
4240 && apk add --no-cache tzdata \
4341 # fix libexpat bug:
4442 # out of memory: line 1, column 0
4543 # https://bugs.launchpad.net/ubuntu/+source/python-xmltodict/+bug/1961800
4644 && apk add 'expat>2.4.7' \
4745 # prepare ---
46+ && chmod +x /app/entrypoint.sh \
4847 && mkdir /data
4948
5049COPY asgi_webdav /app/asgi_webdav
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- # # set non-root user
4- usermod -o -u " $UID " runner
5- groupmod -o -g " $GID " runner
6-
73echo "
84------------------------
9- User uid: $( id -u runner )
10- User gid: $( id -g runner )
5+ App user's UID:GID
6+ $UID : $GID
117------------------------
128"
139
1410echo " prepare..."
15- chown -R runner:runner /data
11+ chown -R $UID : $GID /data
1612
1713echo " server starting..."
18- exec su-exec runner \
14+ exec su-exec $UID : $GID \
1915 python -m asgi_webdav \
2016 --host " $WEBDAV_HOST " \
2117 --port " $WEBDAV_PORT " \
2218 --config " $WEBDAV_CONFIGFILE " \
2319 --logging-no-display-datetime \
24- --logging-no-use-colors
20+ --logging-no-use-colors
You can’t perform that action at this time.
0 commit comments