Commit 0062aa50 authored by nimrod's avatar nimrod
Browse files

Resolver: New image.

parent 8b3744fa
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -244,3 +244,19 @@ push-workbench:
  needs:
    - job: build-workbench
      artifacts: true

# resolver image:

build-resolver:
  extends: .container-build
  variables:
    CONTEXT: resolver

push-resolver:
  extends: .container-push
  variables:
    CONTEXT: resolver
    IMAGE: resolver
  needs:
    - job: build-resolver
      artifacts: true

resolver/.dockerignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
*
!entrypoint

resolver/Dockerfile

0 → 100644
+20 −0
Original line number Diff line number Diff line
FROM alpine:3.13
# hadolint ignore=DL3018
RUN echo '@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
    echo '@community http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
    apk add --update --no-cache \
        bash \
        dma@testing \
        gosu@testing \
        iproute2 \
        knot-resolver@community \
        knot-utils \
        mailx \
        mtr \
    && \
    ln -s /usr/bin/kdig /usr/local/bin/dig && \
    ln -s /usr/bin/khost /usr/local/bin/host
COPY entrypoint /usr/local/sbin/entrypoint
WORKDIR /
ENTRYPOINT [ "entrypoint" ]
CMD [ "bash", "--login" ]

resolver/README.md

0 → 100644
+23 −0
Original line number Diff line number Diff line
# Resolver

[![pipeline status](https://git.shore.co.il/nimrod/resolver/badges/master/pipeline.svg)](https://git.shore.co.il/nimrod/resolver/-/commits/master)

Testing DNS with a clean cache resolver. More info at
https://www.shore.co.il/blog/resolver/.

## Usage

```
docker run --rm -it registry.shore.co.il/resolver
```

## License

This software is licensed under the MIT license (see `LICENSE.txt`).

## Author Information

Nimrod Adar, [contact me](mailto:nimrod@shore.co.il) or visit my
[website](https://www.shore.co.il/). Patches are welcome via
[`git send-email`](http://git-scm.com/book/en/v2/Git-Commands-Email). The repository
is located at: <https://git.shore.co.il/explore/>.

resolver/entrypoint

0 → 100755
+6 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eux
kresd --addr '127.0.0.1' --noninteractive &
echo 'nameserver 127.0.0.1' > /etc/resolv.conf
# shellcheck disable=SC2294
eval exec gosu nobody:nobody "$@"