mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-16 11:58:47 +00:00
update ftldns
This commit is contained in:
parent
324258a705
commit
1c39413107
@ -3,13 +3,12 @@
|
||||
#
|
||||
|
||||
FROM alpine:3
|
||||
#FROM debian:12-slim
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
ARG FTL_VERSION=v5.25.1
|
||||
ARG FTL_FILE=pihole-FTL-musl-linux-x86_64
|
||||
#ARG FTL_FILE=pihole-FTL-aarch64-linux-gnu
|
||||
ARG FTL_URL=https://github.com/pi-hole/FTL/releases/download/${FTL_VERSION}/${FTL_FILE}
|
||||
ARG FTL_GIT=https://github.com/pi-hole
|
||||
ARG FTL_URL=${FTL_GIT}/FTL/releases/download/${FTL_VERSION}/${FTL_FILE}
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache curl \
|
||||
@ -17,6 +16,14 @@ RUN set -xe \
|
||||
&& curl -sSL ${FTL_URL} -o /usr/bin/pihole-FTL \
|
||||
&& chmod +x /usr/bin/pihole-FTL \
|
||||
&& pihole-FTL --version \
|
||||
&& mkdir -p /opt/pihole \
|
||||
&& cd /opt/pihole \
|
||||
&& curl -sSL -O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/list.sh \
|
||||
-O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/utils.sh \
|
||||
-O ${FTL_GIT}/pi-hole/raw/master/advanced/Scripts/COL_TABLE \
|
||||
&& cd /usr/local/bin \
|
||||
&& curl -sSL ${FTL_GIT}/pi-hole/raw/master/pihole -o /usr/local/bin/pihole \
|
||||
&& chmod +x /usr/local/bin/pihole /opt/pihole/list.sh \
|
||||
&& apk del curl
|
||||
|
||||
VOLUME /etc/pihole
|
||||
|
@ -10,10 +10,18 @@ $ docker compose up -d
|
||||
|
||||
$ dig @127.0.0.1 -p 53 www.youtube.com
|
||||
|
||||
$ docker compose exec ftldns pihole-FTL sql -h gravity.db
|
||||
>>> .schema domainlist
|
||||
>>> insert into domainlist(type, domain) values (3, '(\.|^)youtube\.com$');
|
||||
>>> .quit
|
||||
$ docker compose exec ftldns bash
|
||||
>>> pihole-FTL sql -h gravity.db
|
||||
.schema domainlist
|
||||
insert into domainlist(type, domain) values (3, '(\.|^)youtube\.com$');
|
||||
.quit
|
||||
>>> pihole-FTL regex-test www.youtube.com
|
||||
Checking domain against blacklist...
|
||||
(\.|^)youtube\.com$ matches (regex blacklist, DB ID 1)
|
||||
Time: 0.019 msec
|
||||
>>> pihole -b --regex '(\.|^)baidu\.com$'
|
||||
>>> pihole-FTL regex-test www.baidu.com
|
||||
>>> exit
|
||||
|
||||
$ docker compose kill -s RTMIN ftldns
|
||||
|
||||
@ -28,7 +36,8 @@ $ telnet 127.0.0.1 4711
|
||||
>quit
|
||||
```
|
||||
|
||||
> Read more about [telnet-api][2].
|
||||
> Read more about [domainlist][2] and [telnet-api][3].
|
||||
|
||||
[1]: https://github.com/pi-hole/FTL
|
||||
[2]: https://docs.pi-hole.net/ftldns/telnet-api/
|
||||
[2]: https://docs.pi-hole.net/database/gravity/#domain-tables-domainlist
|
||||
[3]: https://docs.pi-hole.net/ftldns/telnet-api/
|
||||
|
Loading…
Reference in New Issue
Block a user