From 83a060a9670fe7898667ac7105acbf9fba882aea Mon Sep 17 00:00:00 2001 From: gsd Date: Sun, 29 Mar 2026 20:36:55 +0300 Subject: [PATCH] build from src --- docker-compose.yaml | 10 ++++++++++ entrypoint.sh | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 docker-compose.yaml create mode 100755 entrypoint.sh diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..7fbe86d --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +services: + go-builder: + image: golang:1.25.5-alpine + volumes: + - $PWD:/app + entrypoint: ["/bin/sh", "-c", "/app/entrypoint.sh"] + environment: + - GOOS=linux + - GOARCH=386 + - CGO_ENABLED=0 \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..2d71274 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh +echo "build $GOOS-$GOARCH" +cd /app +GOOS=$GOOS GOARCH=$GOARCH go build -ldflags "-s -w -checklinkname=0" -trimpath \ + -o "dist/client-${GOOS}-${GOARCH}${EXT}" \ + ./client \ No newline at end of file