Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Marcin Kozlowski <[email protected]>
  • Loading branch information
marcinguy authored Dec 17, 2024
1 parent fb7b6c5 commit 7e4d190
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions docker/docker/worker-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# Base image with Python
FROM python:3.8-slim AS builder

# Non-interactive mode for apt-get
ARG DEBIAN_FRONTEND=noninteractive

# Environment variables
ENV SHELL=/bin/bash
ENV PIPENV_IGNORE_VIRTUALENVS=1
ENV PIP_ROOT_USER_ACTION=ignore
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=$PATH:/usr/local/cargo/bin:/usr/local/go/bin

# Install necessary packages
# Install necessary packages (including uv)
RUN apt-get update && apt-get install -y \
ca-certificates \
curl \
Expand All @@ -21,15 +14,14 @@ RUN apt-get update && apt-get install -y \
git \
ssh \
rubygems \
python3-pip \
pipenv \
unzip \
jq \
gcc \
build-essential

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -y | sh

RUN curl -LsSf https://astral.sh/uv/install.sh -y | sh

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

# Install Go
RUN GO_JSON=$(curl -s https://go.dev/dl/?mode=json) && \
Expand All @@ -46,11 +38,24 @@ RUN GO_JSON=$(curl -s https://go.dev/dl/?mode=json) && \
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

# Clone 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)
RUN cp /srv/betterscan/analyzers/find_unicode_control2.py /usr/local/bin/
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 && \
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

0 comments on commit 7e4d190

Please sign in to comment.