Skip to content

Commit

Permalink
allow volume /etc/hosts.d to be bind mounted and read in as a hosts file
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Feb 11, 2024
1 parent 1518c76 commit 5416321
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LABEL maintainer="Mike Glenn <mglenn@ilude.com>"
LABEL ilude-project=joyride

RUN \
mkdir -p /app /etc \
mkdir -p /app /etc/hosts.d /etc/dnsmasq.d \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
Expand Down
9 changes: 5 additions & 4 deletions app/templates/dnsmasq.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ no-dhcp-interface=eth0
no-resolv
no-poll
no-hosts
hostsdir=/etc/dnsmasq.d
keep-in-foreground
hostsdir=/etc/hosts.d
addn-hosts=/etc/dnsmasq.d/hosts
keep-in-foreground
domain-needed
dns-loop-detect
port=54
log-facility=-
log-facility=-
<% if ENV.fetch('JOYRIDE_LOG_QUERIES', 'false').downcase.eql?('true') %>
log-queries
<% end %>
<% if ENV.fetch('JOYRIDE_LOG_DEBUG', 'false').downcase.eql?('true') %>
log-debug
<% end %>
<% end %>

0 comments on commit 5416321

Please sign in to comment.