mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-18 13:40:45 +08:00

Dockerfile:
- We use `CMD` instead of `ENTRYPOINT` because it's marginally easier
to debug.
- We include 64-bit ARM, but not 32-bit
- We had to re-order the steps so that `apk add bind-tools` came
before copying the binary; that fixed a bug where the
`sslip.io-dns-server` wasn't on the ARM container filesystem (but it
was on the amd64 filesystem 🤔)
Binaries
- We now build arm64 (GOARCH) versions of FreeBSD, Linux, and macOS
(GOOS), but not Windows. It apparently doesn't have arm64 support yet.
19 lines
532 B
Bash
Executable File
19 lines
532 B
Bash
Executable File
#!/bin/bash -x
|
|
#
|
|
# Build binaries for macOS, Windows, Linux, FreeBSD
|
|
#
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
cd $DIR/../src/sslip.io-dns-server
|
|
|
|
export GOOS GOARCH
|
|
# Bring in ARM64 for my AWS Graviton2 instance
|
|
for GOARCH in amd64 arm64; do
|
|
for GOOS in darwin linux freebsd; do
|
|
go build -o $DIR/sslip.io-dns-server-$GOOS-$GOARCH main.go
|
|
done
|
|
done
|
|
|
|
# Windows has a custom extension, can't do arm64 yet
|
|
GOOS=windows GOARCH=amd64
|
|
go build -o $DIR/sslip.io-dns-server-$GOOS-$GOARCH.exe main.go
|