fix: Fixed docker build (#288)

This commit is contained in:
sg70 2021-12-06 15:55:06 +01:00 committed by GitHub
commit 4543f10a8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,8 @@
ARG TAG=3.9.7-alpine3.14 ARG TAG=3.9.7-alpine3.14
FROM python:${TAG} as builder FROM python:${TAG} as builder
ENV PYTHONUNBUFFERED 1
WORKDIR /bin_dir WORKDIR /bin_dir
RUN apk add --no-cache \ RUN apk add --no-cache \
@ -57,8 +59,10 @@ RUN if [ "$INSTALL_ALL" != "false" ]; then \
RUN . /.env && \ RUN . /.env && \
if [ "$CHECKOV_VERSION" != "false" ]; then \ if [ "$CHECKOV_VERSION" != "false" ]; then \
( \ ( \
apk add --no-cache gcc libffi-dev musl-dev; \
[ "$CHECKOV_VERSION" = "latest" ] && pip3 install --no-cache-dir checkov \ [ "$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 ; fi