This commit is contained in:
Stille 2022-08-09 12:38:34 +08:00
parent fcd3158f86
commit 20c74dfbea
2 changed files with 39 additions and 0 deletions

14
nali/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM golang:alpine as builder
RUN apk add --no-cache make git
RUN git clone --depth 1 https://github.com/zu1k/nali /nali-src
WORKDIR /nali-src
RUN go mod download && \
make docker && \
mv ./bin/nali-docker /nali
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=builder /nali /
ENTRYPOINT ["/nali"]

25
nali/README.md Normal file
View File

@ -0,0 +1,25 @@
# nali
GitHub [stilleshan/dockerfiles](https://github.com/stilleshan/dockerfiles)
Docker [stilleshan/nali](https://hub.docker.com/r/stilleshan/nali)
> *docker image support for X86 and ARM*
## 简介
基于 [zu1k/nali](https://github.com/zu1k/nali) 项目的 docker 镜像.
## docker
由于镜像不含 IP 数据库,所以建议后台启动容器服务,挂载目录,每次使用将会自动下载和保留 IP 数据库到本地,方便后续多次使用.
```shell
docker run -d --name nali --restart always \
-v $PWD/conf:/root/.nali \
stilleshan/nali
```
查询命令
```shell
docker exec -it nali /nali 1.1.1.1
# 返回 1.1.1.1 [澳大利亚 APNIC/CloudFlare公共DNS服务器]
```
## 参考
- GitHub [zu1k/nali](https://github.com/zu1k/nali)