add docker option

This commit is contained in:
saya
2025-11-30 10:27:49 -05:00
committed by yuhan6665
parent 9bf9dfaf7f
commit 4dbba8cb1d
2 changed files with 22 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
FROM golang:1.22-alpine AS build
WORKDIR /src
COPY . .
RUN go build -o RealiTLScanner .
FROM alpine:latest
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=build /src/RealiTLScanner .
ENTRYPOINT ["./RealiTLScanner"]
+12 -1
View File
@@ -40,7 +40,18 @@ It is recommended to run this tool locally, as running the scanner in the cloud
# Set a timeout for each scan, default: 10 (seconds)
./RealiTLScanner -addr 107.172.1.1/16 -timeout 5
```
### In docker way
Build container by yourself (you do not needed in golonag on your host)
```bash
docker build -t realitlscanner .
```
Run and research
```bash
# show help
docker run --rm realitlscanner
# scan
docker run --rm realitlscanner -addr 1.1.1.1
```
### Enable Geo IP
To enable Geo IP information, place a MaxMind GeoLite2/GeoIP2 Country Database in the executing folder with the exact name `Country.mmdb`. You can download one from [here](https://github.com/Loyalsoldier/geoip/releases/latest/download/Country.mmdb).