From 9b98e0daed86cbb461951f926bad6829fb646126 Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Wed, 6 Jul 2022 20:54:49 +0100 Subject: [PATCH] sr.ht build config Squashed commit of the following: commit 6b9e43ab023c553310a202f438028e958ea8a043 Author: Gabriel Simmer Date: Wed Jul 6 20:25:10 2022 +0100 start tailscale commit ab0aed35a574aedbaa495711ac36c7728538ca36 Author: Gabriel Simmer Date: Wed Jul 6 19:56:21 2022 +0100 add podman push commit 83dbe58af783dae0887778e7d52efbc8b1d63c8e Author: Gabriel Simmer Date: Wed Jul 6 19:10:11 2022 +0100 correct username commit 02fcccb1b79471c2c7c93004424ff54c35e7e4cc Author: Gabriel Simmer Date: Wed Jul 6 19:08:32 2022 +0100 rootless podman setup commit 9e5d8e739fb2a0503465c79669e5f07a0607d25c Author: Gabriel Simmer Date: Wed Jul 6 19:03:36 2022 +0100 cd into project dir commit 982b14c506c03a96f03314ff61ae0d300e16ec30 Author: Gabriel Simmer Date: Wed Jul 6 18:58:06 2022 +0100 explicitly use docker.io commit 2d47e6e96564c3807246fff54818dad4a173e265 Author: Gabriel Simmer Date: Wed Jul 6 18:55:48 2022 +0100 add docker.io registry commit 34c3069b49dbce1020cb7dfced82f8e6b00b18c5 Author: Gabriel Simmer Date: Wed Jul 6 18:52:09 2022 +0100 remove docker up commit 126387be1e5e1d27b6b3f7cde016f2e1192f349b Author: Gabriel Simmer Date: Wed Jul 6 18:51:58 2022 +0100 switch to podman for image build commit dbf008ab03cb111dd8c7ebfc7e023091e4729c9f Author: Gabriel Simmer Date: Wed Jul 6 18:48:16 2022 +0100 explicit builder commit 024e10951945fa11509317c792abce65df2ccb03 Author: Gabriel Simmer Date: Wed Jul 6 18:38:38 2022 +0100 remove buildx package, multiarch setup command commit d25223aac931d4b965bb3033d2dffb7ec3a74c63 Author: Gabriel Simmer Date: Wed Jul 6 18:26:55 2022 +0100 swich to archlinux base commit 3327e84913cd6ed8974eda9bf637f54babc10cd4 Author: Gabriel Simmer Date: Wed Jul 6 18:25:20 2022 +0100 remove bip commit d3756a075e4963423cda2719e84ea588864064de Author: Gabriel Simmer Date: Wed Jul 6 18:23:41 2022 +0100 bring up dockerd commit 0f10feb28f2b865f639143c8cbbaefd48e0d1129 Author: Gabriel Simmer Date: Wed Jul 6 18:21:15 2022 +0100 Add buildx docker package commit 4b18bcd42f37d8cddb5b6d128766d4b8bdf9bf3e Author: Gabriel Simmer Date: Wed Jul 6 18:19:54 2022 +0100 add clone secret key commit 6e2ae63caee3c6106c48d9dff0fa95ef7b7f2596 Author: Gabriel Simmer Date: Wed Jul 6 18:15:43 2022 +0100 correct source commit c1ff32cfcbe00fec2483c6a6c171ff33ce5dc08a Author: Gabriel Simmer Date: Wed Jul 6 18:14:36 2022 +0100 Build config --- .build.yml | 24 ++++++++++++++++++++++++ Dockerfile | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .build.yml diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..1f7349a --- /dev/null +++ b/.build.yml @@ -0,0 +1,24 @@ +image: archlinux +secrets: + - a3f6aa54-9243-4808-b5a5-414644732c02 + - a297a0ef-628e-41f5-9918-becb5c1010cd +packages: + - podman + - buildah + - fuse-overlayfs + - slirp4netns + - tailscale +sources: + - git@git.sr.ht:~gmem/minecraft-server-invites +tasks: + - setup-docker: | + sudo touch /etc/subuid /etc/subgid + sudo podman run --rm --privileged docker.io/multiarch/qemu-user-static --reset -p yes + sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 build + - build: | + cd minecraft-server-invites + podman build --platform=linux/amd64,linux/arm64/v8 . -t icr.gmem.ca/wlm + - push: | + sudo systemctl start tailscaled + sudo tailscale up --authkey=$(cat ~/.tailscale) + podman push icr.gmem.ca/wlm \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f1c2cac..defe193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:alpine as builder +FROM docker.io/golang:alpine as builder WORKDIR /build/wlm COPY go.mod go.sum ./ @@ -11,7 +11,7 @@ WORKDIR /build/wlm RUN go build -o wlm -ldflags "-s -w" -FROM alpine +FROM docker.io/alpine WORKDIR /app EXPOSE 8080