-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (29 loc) · 1.27 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Build Stage
FROM ubuntu:latest AS build
# Update and install necessary build tools
RUN apt update && apt install -y \
curl unzip git wget python3 python3-pip build-essential \
&& wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz \
&& rm -f go1.23.2.linux-amd64.tar.gz \
&& apt clean && rm -rf /var/lib/apt/lists/*
# Set environment variables for Go
ENV PATH="$PATH:/usr/local/go/bin:/root/go/bin:/usr/local/go/bin:$HOME/.local/bin"
ENV GOROOT="/usr/local/go"
ENV GOPATH="/root/go"
# Install Python dependencies without cache
# Install Go tools
RUN go install github.com/tomnomnom/qsreplace@latest
FROM python:3.10-slim
RUN apt update && apt install git -y && apt clean && rm -rf /var/lib/apt/lists/*
# Copy Go binaries and tools from the build stage
COPY --from=build /usr/local/go /usr/local/go
COPY --from=build /root/go/bin /root/go/bin
RUN pip install --no-cache-dir b-hunters==1.1.7 uro
WORKDIR /app/service
RUN git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git /app/sqlmap
ENV PATH="$PATH:/usr/local/go/bin:/root/go/bin:/usr/local/go/bin:$HOME/.local/bin"
ENV GOROOT="/usr/local/go"
ENV GOPATH="/root/go"
COPY sqlmapm /app/service/sqlmapm
CMD [ "python", "-m", "sqlmapm" ]