Made the image a lot smaller
parent
2556e69cf1
commit
25267f015c
25
Dockerfile
25
Dockerfile
|
@ -1,16 +1,17 @@
|
|||
FROM alpine:3.15.0
|
||||
|
||||
# Install required dependencies to build unbound (and bind-tools for dig in healthcheck)
|
||||
RUN apk update && apk add --no-cache alpine-sdk bind-tools expat-dev git libressl-dev
|
||||
|
||||
# Clone and build unbound source (https://github.com/NLnetLabs/unbound)
|
||||
RUN mkdir -p /tmp/unbound
|
||||
RUN git clone --depth 1 --branch 'release-1.14.0' https://github.com/NLnetLabs/unbound.git /tmp/unbound
|
||||
RUN cd /tmp/unbound && ./configure && make && make install
|
||||
|
||||
# Cleanup build tools
|
||||
RUN apk del alpine-sdk expat-dev git
|
||||
RUN rm -rf /tmp/*
|
||||
# Install required dependencies and build unbound (and install bind-tools for dig in healthcheck)
|
||||
RUN apk --update add --no-cache alpine-sdk bind-tools expat-dev git openssl-dev && \
|
||||
# Clone and build unbound source (https://github.com/NLnetLabs/unbound)
|
||||
git clone --depth 1 --branch 'release-1.14.0' https://github.com/NLnetLabs/unbound.git /tmp/unbound && \
|
||||
cd /tmp/unbound && \
|
||||
./configure && \
|
||||
make && \
|
||||
make install && \
|
||||
make clean && \
|
||||
# Cleanup build tools
|
||||
rm -rf /tmp/* && \
|
||||
apk del alpine-sdk expat-dev git openssl-dev
|
||||
|
||||
# Prepare unbound files
|
||||
COPY entrypoint.sh /
|
||||
|
@ -18,7 +19,7 @@ RUN mkdir -p /srv/unbound
|
|||
COPY unbound.conf /srv/unbound/unbound.conf
|
||||
|
||||
# Prepare
|
||||
RUN adduser unbound --disabled-password
|
||||
RUN adduser -S unbound --disabled-password
|
||||
|
||||
# Health
|
||||
HEALTHCHECK --interval=60s --timeout=3s --retries=2 \
|
||||
|
|
Loading…
Reference in New Issue