From ea89242644ead0f720c7a99eb8d1cdce2a159683 Mon Sep 17 00:00:00 2001 From: Nic Doye Date: Tue, 12 Mar 2019 13:52:42 +0000 Subject: [PATCH] Merge RUNs. Run as non-root --- util/Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/util/Dockerfile b/util/Dockerfile index 7fd854aa..d162c457 100644 --- a/util/Dockerfile +++ b/util/Dockerfile @@ -1,9 +1,15 @@ FROM alpine:3.9 -RUN apk --update --no-cache add python3 bash curl git -RUN pip3 install --upgrade pip -RUN pip install awscli ansi2html boto3 -RUN git clone https://github.com/toniblyx/prowler/ +ARG USERNAME=prowler +ARG USERID=34000 + +RUN addgroup -g ${USERID} ${USERNAME} && \ + adduser -s /bin/sh -G ${USERNAME} -D -u ${USERID} ${USERNAME} && \ + apk --update --no-cache add python3 bash curl git && \ + pip3 install --upgrade pip && \ + pip install awscli ansi2html boto3 &&\ + git clone https://github.com/toniblyx/prowler/ + +USER ${USERNAME} ENTRYPOINT ["/prowler/prowler"] -CMD [] \ No newline at end of file