-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
70 lines (65 loc) · 2.13 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
ARG DISTRO="alpine"
ARG DISTRO_VARIANT="3.21"
FROM docker.io/tiredofit/${DISTRO}:${DISTRO_VARIANT}-7.10.24
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
ARG UNBOUND_VERSION
ENV UNBOUND_VERSION=${UNBOUND_VERSION:-"release-1.22.0"} \
UNBOUND_REPO_URL=https://github.com/NLnetLabs/unbound \
CONTAINER_ENABLE_MESSAGING=FALSE \
IMAGE_NAME="tiredofit/unbound" \
IMAGE_REPO_URL="https://github.com/tiredofit/docker-unbound/"
RUN source /assets/functions/00-container && \
set -x && \
addgroup -g 5353 unbound && \
adduser -S -D -H -h /var/spool/postfix -s /sbin/nologin -G unbound -u 5353 unbound && \
package update && \
package upgrade && \
package install .unbound-build-deps \
bison \
build-base \
expat-dev \
flex \
libevent-dev \
linux-headers \
openssl-dev \
protobuf-c-dev \
python3-dev \
swig \
&& \
package install .unbound-run-deps \
dnssec-root \
expat \
libevent \
openssl \
protobuf-c \
&& \
\
clone_git_repo "${UNBOUND_REPO_URL}" "${UNBOUND_VERSION}" && \mkdir -p /usr/src/unbound && \
export CFLAGS="$CFLAGS -flto=auto" && \
PYTHON_VERSION=3 ./configure \
--build="$CBUILD" \
--host="$CHOST" \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--with-username=unbound \
--with-run-dir="" \
--with-pidfile="" \
--with-rootkey-file=/usr/share/dnssec-root/trusted-key.key \
--with-libevent \
--with-pthreads \
--disable-static \
--disable-rpath \
--enable-dnstap \
--with-ssl \
--without-pythonmodule \
--with-pyunbound && \
\
sed -i -e '/^LIBS=/s/-lpython.*[[:space:]]/ /' Makefile && \
make -j$(nproc)&& \
make install && \
package remove .unbound-install-deps && \
package cleanup
EXPOSE 53
COPY install /