Build sslip.io Dockerfiles for both ARM64 & AMD64

...because, hey, I have a Mac, and native is about 10x faster than amd64
emulation. Also because it's cool.

I had to compile my own version of Concourse's
[`registry-image`](https://github.com/concourse/registry-image-resource)
container image because the one shipped with Concourse 7.8.3 is old and
doesn't have the multi-platform feature:

```
docker build --build-arg base_image=ubuntu -t cunnie/registry-image -f dockerfiles/ubuntu/Dockerfile
```

Switch Alpine → Fedora to address weird connection issue:

```
 > [linux/arm64 3/3] RUN wget https://github.com/cunnie/sslip.io/releases/download/2.6.0/sslip.io-dns-server-linux-arm64     -O /usr/sbin/sslip.io-dns-server;   chmod 755 /usr/sbin/sslip.io-dns-server:
Connecting to github.com (192.30.255.113:443)
wget: error getting response: Connection reset by peer
```

[#21]
This commit is contained in:
Brian Cunnie
2022-10-23 15:15:54 -07:00
parent 97246b869f
commit 6b6549b70a
3 changed files with 52 additions and 30 deletions

8
k8s/Dockerfile-delete-me Normal file
View File

@@ -0,0 +1,8 @@
#
# cunnie/delete-me
#
# test Dockerfile
#
FROM alpine
LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"

View File

@@ -19,15 +19,15 @@
# dig +short 127.0.0.1.example.com @localhost -p 3353
# 127.0.0.1
#
FROM alpine AS sslip.io
FROM fedora
LABEL org.opencontainers.image.authors="Brian Cunnie <brian.cunnie@gmail.com>"
RUN apk update && apk add bind-tools
RUN dnf install -y bind-utils
ARG TARGETARCH # amd64, arm64 (so I can run on AWS graviton2)
RUN wget https://github.com/cunnie/sslip.io/releases/download/2.6.0/sslip.io-dns-server-linux-$TARGETARCH \
-O /usr/sbin/sslip.io-dns-server; \
RUN curl https://github.com/cunnie/sslip.io/releases/download/2.6.0/sslip.io-dns-server-linux-$TARGETARCH \
-o /usr/sbin/sslip.io-dns-server; \
chmod 755 /usr/sbin/sslip.io-dns-server
CMD ["/usr/sbin/sslip.io-dns-server"]