diff --git a/docker/Dockerfile b/docker/Dockerfile index 09063254..da6e9ba4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,6 @@ -FROM alpine@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd +FROM debian@sha256:aadf411dc9ed5199bc7dab48b3e6ce18f8bbee4f170127f5ff1b75cd8035eb36 WORKDIR /app -# Received args ARG VERSION ENV APP_VERSION=$VERSION @@ -26,44 +25,29 @@ ENV DET_PIPELINE_NAME="" \ DET_PROJECT_NAME="" \ DET_REPOSITORY="" -# Container remote config creation -COPY /example_remote_config_local /app/example_remote_config_local -COPY /docker/remoteConfigGeneration.sh /app/remoteConfigGeneration.sh +RUN apt-get update && apt-get install -y bash +RUN apt-get update && apt-get install -y dos2unix -RUN chmod +x /app/remoteConfigGeneration.sh -RUN apk add --no-cache bash -RUN ./remoteConfigGeneration.sh +COPY ./example_remote_config_local /app/example_remote_config_local +COPY ./docker/remoteConfigGeneration.sh /app/remoteConfigGeneration.sh -COPY .envdetlocal /app/.env +RUN dos2unix /app/remoteConfigGeneration.sh -RUN apk update && \ - apk add --no-cache \ - docker \ - openrc \ - git \ - build-base \ - libffi-dev \ - openssl-dev \ - bzip2-dev \ - zlib-dev \ - readline-dev \ - sqlite-dev \ - wget \ - xz +RUN chmod +x /app/remoteConfigGeneration.sh +RUN /bin/bash remoteConfigGeneration.sh -# Enable and start Docker service -RUN rc-update add docker boot +COPY .envdetlocal /app/.env -RUN apk add python3 -RUN apk add py-pip +RUN apt-get update && \ + apt-get install -y \ + python3-venv \ + python3-pip -# Ensure python3 points to the new version -RUN ln -s /usr/local/bin/python3 /usr/local/bin/python3 && \ - ln -s /usr/local/bin/pip3 /usr/local/bin/pip3 +RUN ln -s /usr/bin/python3 /usr/local/bin/python3 && \ + ln -s /usr/bin/pip3 /usr/local/bin/pip3 RUN python3 -m venv venv -RUN source venv/bin/activate - +RUN python3 -m pip install --break-system-packages checkov==2.3.296 RUN python3 -m pip install --break-system-packages -i https://pypi.org/simple devsecops-engine-tools==$APP_VERSION CMD ["sh", "-c", "dockerd & while ! docker info > /dev/null 2>&1; do sleep 1; done; sh"] \ No newline at end of file diff --git a/docker/remoteConfigGeneration.sh b/docker/remoteConfigGeneration.sh index e7710bc5..1c573aa4 100755 --- a/docker/remoteConfigGeneration.sh +++ b/docker/remoteConfigGeneration.sh @@ -1,6 +1,5 @@ #!/bin/bash -cp -r ../example_remote_config_local ./ -mv example_remote_config_local docker_default_remote_config -json_file="docker_default_remote_config/engine_core/ConfigTool.json" -sed -i 's/"TOOL": "CHECKOV|KUBESCAPE|KICS"/"TOOL": "CHECKOV"/' "$json_file" +mv /app/example_remote_config_local /app/docker_default_remote_config +json_file="/app/docker_default_remote_config/engine_core/ConfigTool.json" +sed -i 's/"TOOL": "CHECKOV|KUBESCAPE|KICS"/"TOOL": "CHECKOV"/' "$json_file" \ No newline at end of file diff --git a/tools/devsecops_engine_tools/version.py b/tools/devsecops_engine_tools/version.py index f22f38bf..8d30f618 100644 --- a/tools/devsecops_engine_tools/version.py +++ b/tools/devsecops_engine_tools/version.py @@ -1 +1 @@ -version = '1.8.6' +version = '1.8.7'