mirror of
https://git.mills.io/prologic/zs.git
synced 2024-11-16 09:16:19 -05:00
Compare commits
No commits in common. "15e7a102cdb0ff249b18e953a5e6d1dd91a99354" and "b137b085d4d838310a15248704f71d064c71809e" have entirely different histories.
15e7a102cd
...
b137b085d4
@ -1,15 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
[ -n "${PUID}" ] && usermod -u "${PUID}" nobody
|
||||
[ -n "${PGID}" ] && groupmod -g "${PGID}" nobody
|
||||
fi
|
||||
[ -n "${PUID}" ] && usermod -u "${PUID}" zs
|
||||
[ -n "${PGID}" ] && groupmod -g "${PGID}" zs
|
||||
|
||||
printf "Configuring zs...\n"
|
||||
|
||||
if [ "$(id -u)" -eq 0 ]; then
|
||||
printf "Switching UID=%s and GID=%s\n" "$(id -u nobody)" "$(id -g nobody)"
|
||||
exec su-exec nobody:nobody "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
printf "Switching UID=%s and GID=%s\n" "${PUID}" "${PGID}"
|
||||
exec su-exec zs:zs "$@"
|
||||
|
@ -50,7 +50,9 @@ RUN apk --no-cache -U add su-exec shadow tzdata ca-certificates curl jq
|
||||
ENV PUID=1000
|
||||
ENV PGID=1000
|
||||
|
||||
RUN mkdir -p /data && chown -R nobody:nobody /data
|
||||
RUN addgroup -g "${PGID}" zs && \
|
||||
adduser -D -H -G zs -h /var/empty -u "${PUID}" zs && \
|
||||
mkdir -p /data && chown -R zs:zs /data
|
||||
|
||||
EXPOSE 8000/tcp
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user