Skip to content

Commit

Permalink
feat: Make docker image work with non-root users (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbridts authored Aug 25, 2022
1 parent 984276f commit 30245cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/ /

0 comments on commit 30245cf

Please sign in to comment.