This commit is contained in:
yabets4 2026-05-31 04:41:03 -07:00 committed by GitHub
commit 7362dfac41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -1,6 +1,9 @@
FROM alpine:3.20
RUN apk add --no-cache util-linux bash
# Create non-root user for security (CWE-250: Execution with Unnecessary Privileges)
RUN adduser -D -u 1000 nomaduser
COPY collect-disk-info.sh /usr/local/bin/collect-disk-info.sh
RUN chmod +x /usr/local/bin/collect-disk-info.sh && mkdir -p /storage
WORKDIR /storage
USER nomaduser
CMD ["/usr/local/bin/collect-disk-info.sh"]

View File

@ -3,6 +3,9 @@ FROM alpine:3.20
# Install Docker CLI for compose operations
RUN apk add --no-cache docker-cli docker-cli-compose bash jq
# Create non-root user for security (CWE-250: Execution with Unnecessary Privileges)
RUN adduser -D -u 1000 nomaduser
# Copy the update watcher script
COPY update-watcher.sh /usr/local/bin/update-watcher.sh
RUN chmod +x /usr/local/bin/update-watcher.sh
@ -11,5 +14,5 @@ RUN chmod +x /usr/local/bin/update-watcher.sh
RUN mkdir -p /shared
WORKDIR /shared
USER nomaduser
CMD ["/usr/local/bin/update-watcher.sh"]