From 30245cfe77c0396664a3baff0b4cd8e8d8c58f63 Mon Sep 17 00:00:00 2001 From: Ben Bridts Date: Thu, 25 Aug 2022 05:08:19 +0200 Subject: [PATCH] feat: Make docker image work with non-root users (#219) --- docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index be0f1c9..aefc14e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -6,6 +6,8 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/aws-cloudformation/cloudformation-guard/main/install-guard.sh | sh -ENV PATH "${PATH}:root/.guard/bin" +# /opt/guard/bin/cfn-guard is a softlink, so we deference it. We don't need other files that way (so no -r) +RUN mkdir -p "/opt/bin" && cp --dereference "/root/.guard/bin/cfn-guard" "/opt/bin/" +ENV PATH "${PATH}:/opt/bin" COPY ./output/ /