Allow non-root user to run git clone plugin

This commit is contained in:
Shubham Agrawal
2021-05-06 19:12:05 +05:30
parent 41c2120a63
commit 79700f47fe
2 changed files with 16 additions and 7 deletions

View File

@ -1,5 +1,9 @@
FROM alpine:3.12
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli
RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli sudo
ADD posix/* /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/clone"]
RUN adduser -g Drone -s /bin/sh -D -u 1000 drone
RUN echo 'drone ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/drone
USER drone:drone
ENTRYPOINT ["/usr/local/bin/clone"]