mirror of
https://github.com/aljazceru/addons.git
synced 2026-02-01 11:15:38 +01:00
dnsmasq: Collection of small improvements (#899)
* dnsmasq: Prettier YAML & JSON files * dnsmasq: Update add-on URL * dnsmasq: Pin add-on base images * dnsmasq: Move data files into data folder * dnsmasq: Tweaks documentation
This commit is contained in:
committed by
Pascal Vizeli
parent
f56d653d22
commit
4fd5cf5da8
@@ -8,7 +8,7 @@ ENV LANG C.UTF-8
|
||||
RUN apk add --no-cache dnsmasq
|
||||
|
||||
# Copy data
|
||||
COPY run.sh /
|
||||
COPY dnsmasq.conf /etc/
|
||||
COPY data/run.sh /
|
||||
COPY data/dnsmasq.conf /etc/
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
|
||||
@@ -12,7 +12,7 @@ an internal address inside your network.
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is straightforward and easy to do.
|
||||
Follow these steps to get the add-on installed on your system:
|
||||
|
||||
1. Navigate in your Home Assistant frontend to **Hass.io** -> **Add-on Store**.
|
||||
2. Find the "Dnsmasq" add-on and click it.
|
||||
@@ -55,11 +55,11 @@ Google's public DNS servers: `"8.8.8.8", "8.8.4.4".
|
||||
This option allows you to list domain that are forwarded to a different
|
||||
(not the default) upstream DNS server.
|
||||
|
||||
#### Option: `forwards` -> `domain`
|
||||
#### Option: `forwards.domain`
|
||||
|
||||
The domain to forward to a different upstream DNS server.
|
||||
|
||||
#### Option: `forwards` -> `server`
|
||||
#### Option: `forwards.server`
|
||||
|
||||
The DNS server to forward the request for this domain to.
|
||||
|
||||
@@ -76,11 +76,11 @@ it would resolve normally.
|
||||
|
||||
This options allows you to create a so called: Split DNS.
|
||||
|
||||
#### Option: `hosts` -> `host`
|
||||
#### Option: `hosts.host`
|
||||
|
||||
The hostname or domainname to resolve locally.
|
||||
|
||||
#### Option: `hosts` -> `ip`
|
||||
#### Option: `hosts.ip`
|
||||
|
||||
The IP address Dnsmasq should respond with in its DNS answer.
|
||||
|
||||
|
||||
@@ -3,20 +3,19 @@
|
||||
trigger:
|
||||
branches:
|
||||
include:
|
||||
- master
|
||||
- master
|
||||
paths:
|
||||
include:
|
||||
- dnsmasq/*
|
||||
- dnsmasq/*
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- name: versionBuilder
|
||||
value: '2.0'
|
||||
value: "2.0"
|
||||
- group: docker
|
||||
|
||||
|
||||
jobs:
|
||||
- template: /.azure/azp-template-addon.yml
|
||||
parameters:
|
||||
addon: 'dnsmasq'
|
||||
arch: '--all'
|
||||
- template: /.azure/azp-template-addon.yml
|
||||
parameters:
|
||||
addon: "dnsmasq"
|
||||
arch: "--all"
|
||||
|
||||
9
dnsmasq/build.json
Normal file
9
dnsmasq/build.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"build_from": {
|
||||
"aarch64": "homeassistant/aarch64-base:3.10",
|
||||
"amd64": "homeassistant/amd64-base:3.10",
|
||||
"armhf": "homeassistant/armhf-base:3.10",
|
||||
"armv7": "homeassistant/armv7-base:3.10",
|
||||
"i386": "homeassistant/i386-base:3.10"
|
||||
}
|
||||
}
|
||||
@@ -3,14 +3,8 @@
|
||||
"version": "1.3",
|
||||
"slug": "dnsmasq",
|
||||
"description": "A simple DNS server",
|
||||
"url": "https://home-assistant.io/addons/dnsmasq/",
|
||||
"arch": [
|
||||
"armhf",
|
||||
"armv7",
|
||||
"aarch64",
|
||||
"amd64",
|
||||
"i386"
|
||||
],
|
||||
"url": "https://github.com/home-assistant/hassio-addons/tree/master/dnsmasq",
|
||||
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
|
||||
"startup": "system",
|
||||
"boot": "auto",
|
||||
"ports": {
|
||||
@@ -18,17 +12,12 @@
|
||||
"53/udp": 53
|
||||
},
|
||||
"options": {
|
||||
"defaults": [
|
||||
"8.8.8.8",
|
||||
"8.8.4.4"
|
||||
],
|
||||
"defaults": ["8.8.8.8", "8.8.4.4"],
|
||||
"forwards": [],
|
||||
"hosts": []
|
||||
},
|
||||
"schema": {
|
||||
"defaults": [
|
||||
"str"
|
||||
],
|
||||
"defaults": ["str"],
|
||||
"forwards": [
|
||||
{
|
||||
"domain": "str",
|
||||
|
||||
@@ -4,6 +4,7 @@ set -e
|
||||
CONFIG="/etc/dnsmasq.conf"
|
||||
|
||||
bashio::log.info "Configuring dnsmasq..."
|
||||
|
||||
# Add default forward servers
|
||||
for server in $(bashio::config 'defaults'); do
|
||||
echo "server=${server}" >> "${CONFIG}"
|
||||
@@ -25,6 +26,6 @@ for host in $(bashio::config 'hosts|keys'); do
|
||||
echo "address=/${HOST}/${IP}" >> "${CONFIG}"
|
||||
done
|
||||
|
||||
# run dnsmasq
|
||||
# Run dnsmasq
|
||||
bashio::log.info "Starting dnsmasq..."
|
||||
exec dnsmasq -C "${CONFIG}" -z < /dev/null
|
||||
Reference in New Issue
Block a user