-RUN curl -fsSL https://github.com/StackExchange/dnscontrol/releases/download/v3.9.0/dnscontrol-Linux -o /usr/local/bin/dnscontrol \
- && chmod +x /usr/local/bin/dnscontrol \
- && /usr/local/bin/dnscontrol version
+SHELL ["/bin/bash", "-o", "pipefail", "-c"]
+
+RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) \
+ && curl -fsSL https://github.com/StackExchange/dnscontrol/releases/download/v3.20.0/dnscontrol-3.20.0.${arch}.deb -o /tmp/dnscontrol.deb \
+ && apt install /tmp/dnscontrol.deb -y