From e029b5d8004b48cd8f0268e086e05c81e325d12a Mon Sep 17 00:00:00 2001 From: Sven Geisler Date: Sun, 28 Nov 2021 17:18:20 +0100 Subject: [PATCH 1/2] chore: fix docker build (#287) --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index d9141d104..05a5fbd15 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,8 @@ WORKDIR /bin_dir RUN apk add --no-cache \ # Builder deps curl \ + gcc \ + musl-dev \ unzip && \ # Upgrade pip for be able get latest Checkov python3 -m pip install --upgrade pip From 399c36ac73153ca4f9477015f7a32aeed6df02c4 Mon Sep 17 00:00:00 2001 From: Sven Geisler Date: Tue, 30 Nov 2021 20:59:40 +0100 Subject: [PATCH 2/2] Apply review suggestions --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 05a5fbd15..d643404a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,13 @@ ARG TAG=3.9.7-alpine3.14 FROM python:${TAG} as builder +ENV PYTHONUNBUFFERED 1 + WORKDIR /bin_dir RUN apk add --no-cache \ # Builder deps curl \ - gcc \ - musl-dev \ unzip && \ # Upgrade pip for be able get latest Checkov python3 -m pip install --upgrade pip @@ -59,8 +59,10 @@ RUN if [ "$INSTALL_ALL" != "false" ]; then \ RUN . /.env && \ if [ "$CHECKOV_VERSION" != "false" ]; then \ ( \ + apk add --no-cache gcc libffi-dev musl-dev; \ [ "$CHECKOV_VERSION" = "latest" ] && pip3 install --no-cache-dir checkov \ - || pip3 install --no-cache-dir checkov==${CHECKOV_VERSION} \ + || pip3 install --no-cache-dir checkov==${CHECKOV_VERSION}; \ + apk del gcc libffi-dev musl-dev \ ) \ ; fi