Browse Source

build from src

ish_v.1.2.1
gsd 2 months ago
parent
commit
83a060a967
  1. 10
      docker-compose.yaml
  2. 6
      entrypoint.sh

10
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

6
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
Loading…
Cancel
Save