From 4f97d6610c16c12c92494f2d07b33f973606cd03 Mon Sep 17 00:00:00 2001 From: Marcin Kozlowski Date: Tue, 17 Dec 2024 14:01:30 +0100 Subject: [PATCH] Update Dockerfile Signed-off-by: Marcin Kozlowski --- docker/docker/worker-cli/Dockerfile | 39 ++++++++++------------------- 1 file changed, 13 insertions(+), 26 deletions(-) diff --git a/docker/docker/worker-cli/Dockerfile b/docker/docker/worker-cli/Dockerfile index c2fea1b..c93f5a6 100644 --- a/docker/docker/worker-cli/Dockerfile +++ b/docker/docker/worker-cli/Dockerfile @@ -5,23 +5,9 @@ ENV SHELL=/bin/bash ENV PIPENV_IGNORE_VIRTUALENVS=1 ENV PIP_ROOT_USER_ACTION=ignore -# Install necessary packages (including uv) -RUN apt-get update && apt-get install -y \ - ca-certificates \ - curl \ - tar \ - libssl-dev \ - git \ - ssh \ - rubygems \ - python3-pip \ - pipenv \ - unzip \ - jq \ - gcc \ - build-essential - -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && curl -sSf https://raw.githubusercontent.com/astral-sh/uv/master/install.sh | sh + +RUN apt-get update && apt-get install -y ca-certificates curl tar libssl-dev git ssh rubygems python3-pip pipenv unzip jq gcc build-essential + # Install Go RUN GO_JSON=$(curl -s https://go.dev/dl/?mode=json) && \ @@ -37,25 +23,26 @@ RUN GO_JSON=$(curl -s https://go.dev/dl/?mode=json) && \ curl -O $GO_URL && \ tar -C /usr/local -xzf ${GO_LATEST}.linux-${GO_ARCH}.tar.gz && \ rm ${GO_LATEST}.linux-${GO_ARCH}.tar.gz - + # Set up Go environment variables ENV PATH=$PATH:/usr/local/go/bin -# Install Ruby and Python packages using uv -RUN uv install brakeman \ - && uv install bandit \ - && uv install checkmate5 +# Install Ruby and npm packages +RUN gem install brakeman + +RUN pip install pip && pip install bandit && pip install checkmate5 -# Clone repositories +# Clone and install other repositories RUN git clone https://github.com/tcosolutions/betterscan.git /srv/betterscan && \ git clone https://github.com/tcosolutions/graudit-ce.git /root/graudit && \ git clone https://github.com/tcosolutions/text4shell-ce.git /root/text4shell-ce -# Set up additional tools (using uv where possible) +# Set up additional tools RUN cp /srv/betterscan/analyzers/find_unicode_control2.py /usr/local/bin/ && \ - uv go install honnef.co/go/tools/cmd/staticcheck@latest && \ - uv go install github.com/tcosolutions/ptpt@latest && \ + go install honnef.co/go/tools/cmd/staticcheck@latest && \ + go install github.com/tcosolutions/ptpt@latest && \ cp /root/go/bin/staticcheck /usr/local/bin/staticcheck && \ curl https://raw.githubusercontent.com/aquasecurity/tfsec/master/scripts/install_linux.sh | bash && \ curl https://raw.githubusercontent.com/armosec/kubescape/master/install.sh | bash +