dnsmasq
container is testing successfully now.
This commit is contained in:
@@ -2,20 +2,25 @@
|
||||
#
|
||||
# Create a Debian container which runs dnsmasq.
|
||||
# https://wiki.debian.org/dnsmasq
|
||||
# https://computingforgeeks.com/run-and-use-dnsmasq-in-docker-container/?expand_article=1
|
||||
#
|
||||
|
||||
FROM debian
|
||||
|
||||
# Remove Existing Config
|
||||
RUN rm -rfv /etc/{hosts,resolv.conf,dnsmasq.conf}
|
||||
|
||||
# Install Dependencies
|
||||
RUN apt update && apt install -y dnsmasq
|
||||
RUN apt-get update && apt-get install -y dnsmasq vim inetutils-ping
|
||||
|
||||
# Copy Configuration Files
|
||||
COPY ./config/hosts /etc/
|
||||
COPY ./config/resolv.conf /etc/
|
||||
COPY ./config/dnsmasq.conf /etc/
|
||||
RUN mkdir -pv /etc/dnsmasq
|
||||
COPY ./config/hosts /etc/dnsmasq/hosts
|
||||
COPY ./config/resolv.conf /etc/dnsmasq/resolv.conf
|
||||
COPY ./config/dnsmasq.conf /etc/dnsmasq/dnsmasq.conf
|
||||
|
||||
## Reload Service
|
||||
RUN service dnsmasq restart
|
||||
# Stop Default Service
|
||||
RUN service dnsmasq stop
|
||||
|
||||
# Load Specific Config Files
|
||||
CMD dnsmasq -k --log-facility=- --log-queries=extra \
|
||||
--conf-file=/etc/dnsmasq/dnsmasq.conf \
|
||||
--no-hosts --addn-hosts=/etc/dnsmasq/hosts \
|
||||
--resolv-file=/etc/dnsmasq/resolv.conf
|
||||
|
Reference in New Issue
Block a user