Skip to content

Commit

Permalink
doc(README): minor tweaks
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo de la Fuente <rodrigo@delafuente.email>
  • Loading branch information
panchoh and rodrigofuente authored Dec 31, 2024
1 parent 6037159 commit 594d290
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# docker-dnsmasq

It's a [dnsmasq][dnsmasq] Docker image. It is only 4 MB in size. It is just an
`ENTRYPOINT` to the `dnsmasq` binary. Can you smell what the rock is cookin'?
I’ts a [dnsmasq][dnsmasq] Docker image.
It is only a few MB in size.
It is just an `ENTRYPOINT` to the `dnsmasq` binary.

## Usage

Expand All @@ -11,17 +12,17 @@ image in a production setting. There are two tags to choose from:
- `4km3/dnsmasq:2.90-r3`: dnsmasq 2.90-r3 based on Alpine 3.21 (for backwards compatibility, `latest` points to this tag)
- `4km3/dnsmasq:edge`: based on Alpine edge

[dnsmasq][dnsmasq] requires `NET_ADMIN` capabilities to run correctly. Start it
with something like `docker run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN 4km3/dnsmasq:2.90-r3`.
Dnsmasq requires `NET_ADMIN` capabilities to run correctly.
Start it with something like `docker run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN 4km3/dnsmasq:2.90-r3`.

The configuration is all handled on the command line (no wrapper scripts here).
The `ENTRYPOINT` is `dnsmasq -k` to keep it running in the foreground. If you
wanted to send requests for an internal domain (such as Consul) you can forward
the requests upstream using something like `docker run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN 4km3/dnsmasq:2.75 -S /consul/10.17.0.2`. This will send a
request for `redis.service.consul` to `10.17.0.2`
The `ENTRYPOINT` is `dnsmasq --keep-in-foreground` to keep it running in the foreground.
If you wanted to send requests for an internal domain (such as Consul) you can forward
the requests upstream using something like `docker run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN 4km3/dnsmasq:2.75 -S /consul/10.17.0.2`.
This will send a request for `redis.service.consul` to `10.17.0.2`

As this is a very barebones entrypoint with just enough to run in the
foreground, there is no logging enabled by default. To send logging to stdout
you can add `--log-facility=-` as an option.
foreground, there is no logging enabled by default.
To send logging to stdout you can add `--log-facility=-` as an option.

[dnsmasq]: http://www.thekelleys.org.uk/dnsmasq/doc.html
[dnsmasq]: http://www.thekelleys.org.uk/dnsmasq/doc.html

0 comments on commit 594d290

Please sign in to comment.