Skip to content

Commit 7e55b3d

Browse files
committed
增加dockefile
1 parent 755a5dd commit 7e55b3d

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# sqlmap REST-JSON API server image
2+
# Build: docker build -t sqlmap-api .
3+
# Run: docker run -p 8775:8775 -e SQLMAP_EXTERNAL_LOG_URL=https://your-log-api.example/log sqlmap-api
4+
5+
FROM python:3-alpine
6+
7+
LABEL maintainer="sqlmap"
8+
LABEL description="sqlmap REST-JSON API server with optional external log URL"
9+
10+
RUN apk add --no-cache \
11+
gcc \
12+
musl-dev \
13+
libffi-dev \
14+
openssl-dev
15+
16+
WORKDIR /app
17+
18+
COPY . .
19+
20+
# Default: run API server; listen on all interfaces for container use
21+
ENV SQLMAP_API_HOST=0.0.0.0
22+
ENV SQLMAP_API_PORT=8775
23+
24+
EXPOSE 8775
25+
26+
# Pass log API URL either by env or by argument:
27+
# docker run -e SQLMAP_EXTERNAL_LOG_URL=https://log.example.com/ingest -p 8775:8775 sqlmap-api
28+
# docker run -p 8775:8775 sqlmap-api --log-url https://log.example.com/ingest
29+
ENTRYPOINT ["python", "sqlmapapi.py", "-s", "-H", "0.0.0.0", "-p", "8775"]
30+
CMD []

0 commit comments

Comments
 (0)