Browse Source

Fix signal handling using su-exec and ownership of default data volume /data

pull/520/head
James Mills 3 weeks ago
parent
commit
59f6535129
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 10
      .dockerfiles/entrypoint.sh
  2. 2
      Dockerfile

10
.dockerfiles/entrypoint.sh

@ -1,8 +1,10 @@
#!/bin/sh
[ -z "${PUID}" ] && usermod -u "${PUID}" yarnd
[ -z "${PGID}" ] && groupmod -g "${PGID}" yarnd
[ -n "${PUID}" ] && usermod -u "${PUID}" yarnd
[ -n "${PGID}" ] && groupmod -g "${PGID}" yarnd
printf "Switching UID=%s and GID=%s\n" "${PUID}" "${PGID}"
printf "Fixing ownership of default /data volume...\n"
chown -R yarnd:yarnd /data
su -s /bin/sh -c "exec $*"
printf "Switching UID=%s and GID=%s\n" "${PUID}" "${PGID}"
exec su-exec yarnd:yarnd "$@"

2
Dockerfile

@ -56,7 +56,7 @@ RUN make server VERSION=$VERSION COMMIT=$COMMIT
# Runtime
FROM alpine:latest
RUN apk --no-cache -U add ca-certificates tzdata ffmpeg
RUN apk --no-cache -U add su-exec shadow ca-certificates tzdata ffmpeg
ENV PUID=1000
ENV PGID=1000

Loading…
Cancel
Save