🐞 Docker build fails when curl fails

Our CI sometimes builds "broken" docker images because it fails
downloading the proper executable (because I haven't populated the
GitHub release yet).

I'd like it to fail rather than publish broken images.

Fixes, during `docker run -it --rm cunnie/sslip.io-dns-server`:
```
exec /usr/sbin/sslip.io-dns-server: exec format error
```
This commit is contained in:
Brian Cunnie
2022-11-26 18:39:30 -08:00
parent 036b7a0c3a
commit 8052a84428

View File

@@ -26,7 +26,7 @@ LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"
RUN dnf install -y bind-utils
ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2)
RUN curl -L https://github.com/cunnie/sslip.io/releases/download/2.6.2/sslip.io-dns-server-linux-$TARGETARCH \
RUN curl -f -L https://github.com/cunnie/sslip.io/releases/download/2.6.2/sslip.io-dns-server-linux-$TARGETARCH \
-o /usr/sbin/sslip.io-dns-server; \
chmod 755 /usr/sbin/sslip.io-dns-server