Add non-root user

This commit is contained in:
Nick Alteen
2025-12-05 11:29:04 -05:00
parent c6338c4a08
commit 278f37da10

View File

@@ -7,5 +7,12 @@ WORKDIR /usr/src
# Copy any source file(s) required for the action.
COPY entrypoint.sh .
# Create a non-root user and switch to it.
RUN addgroup -S actiongroup && adduser -S actionuser -G actiongroup && \
chown -R actionuser:actiongroup /usr/src && \
chmod +x /usr/src/entrypoint.sh
USER actionuser
# Configure the container to be run as an executable.
ENTRYPOINT ["/usr/src/entrypoint.sh"]