Skip to content

Commit

Permalink
feat: add docker permission related settings (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
1lkei authored Mar 25, 2024
1 parent 78b5b8a commit c696b59
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ FROM alpine:3.14.2
LABEL maintainer="monkeyWie"
WORKDIR /app
COPY --from=go /app/dist/gopeed ./
COPY entrypoint.sh ./entrypoint.sh
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache bash su-exec; \
chmod +x ./entrypoint.sh && \
rm -rf /var/cache/apk/*
VOLUME ["/app/storage"]
ENV PUID=0 PGID=0 UMASK=022
EXPOSE 9999
ENTRYPOINT ["./gopeed"]
ENTRYPOINT ["./entrypoint.sh"]
7 changes: 7 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

chown -R ${PUID}:${PGID} /app/Download

umask ${UMASK}

exec su-exec ${PUID}:${PGID} ./gopeed "$@"

0 comments on commit c696b59

Please sign in to comment.