diff --git a/Dockerfile b/Dockerfile index 2784b1b..bb190db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ FROM alpine:latest ARG KUBESCAPE_VERSION=latest RUN apk add --no-cache git bash curl jq -RUN curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | KUBESCAPE_VERSION=${KUBESCAPE_VERSION} /bin/bash +RUN if [ "${KUBESCAPE_VERSION}" = "latest" ]; then \ + curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash; \ + else \ + curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v "${KUBESCAPE_VERSION}"; \ + fi COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]