标签:tin 比较 chm key file inux load services alpine
实际开发中dns 是一个比较重要的组件,一般大家可能会选择使用dnsmasq 但是缺少UI可视化,有些人可能会选择powerdns
jpillora/dnsmasq 是一个对于dnsmasq 的包装,使用了jpillora/webproc 为dnsmasq 暴露一个可视化UI,以下是一个简单的运行
demo
version: "3"
services:
dns:
image: jpillora/dnsmasq
ports:
- "53:53/udp"
- "53:53/tcp"
- "8080:8080"
env_file:
- .env
HTTP_USER=demo
HTTP_PASS=demo
FROM alpine:edge
LABEL maintainer="dev@jpillora.com"
# webproc release settings
ENV WEBPROC_VERSION 0.2.2
ENV WEBPROC_URL https://github.com/jpillora/webproc/releases/download/$WEBPROC_VERSION/webproc_linux_amd64.gz
# fetch dnsmasq and webproc binary
RUN apk update \
&& apk --no-cache add dnsmasq \
&& apk add --no-cache --virtual .build-deps curl \
&& curl -sL $WEBPROC_URL | gzip -d - > /usr/local/bin/webproc \
&& chmod +x /usr/local/bin/webproc \
&& apk del .build-deps
#configure dnsmasq
RUN mkdir -p /etc/default/
RUN echo -e "ENABLED=1\nIGNORE_RESOLVCONF=yes" > /etc/default/dnsmasq
COPY dnsmasq.conf /etc/dnsmasq.conf
#run!
ENTRYPOINT ["webproc","--config","/etc/dnsmasq.conf","--","dnsmasq","--no-daemon"]
docker-compose up -d
使用dig 工具
dig @localhost www.baidu.com
效果
以上是一个简单运行,更多的学习下集成的方式
https://hub.docker.com/r/jpillora/dnsmasq/dockerfile
https://github.com/jpillora/webproc
https://github.com/rongfengliang/jpillora-dnsmasq-docker-compose
使用jpillora/dnsmasq 提供可视化管理的dns server
标签:tin 比较 chm key file inux load services alpine
原文地址:https://www.cnblogs.com/rongfengliang/p/11498598.html