Build configuration examples for testing and documentation: - build-minimal.yaml - Auto-detect everything - build-go-cli.yaml - Cross-platform CLI - build-go-wails.yaml - Desktop app with frontend - build-go-library.yaml - Library (no binary) - build-docker.yaml - Multi-arch container - build-docker-go.yaml - Go binary + Docker - build-linuxkit.yaml - Immutable Linux images - build-php-laravel.yaml - FrankenPHP + Laravel - build-multi-binary.yaml - Multiple binaries - build-full.yaml - All available options Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
732 B
YAML
42 lines
732 B
YAML
# Example: Go + Docker Build Configuration
|
|
# Build Go binary then containerize
|
|
|
|
version: 1
|
|
|
|
project:
|
|
name: myservice
|
|
binary: myservice
|
|
|
|
# First: build Go binary
|
|
build:
|
|
main: ./cmd/myservice
|
|
env:
|
|
CGO_ENABLED: "0"
|
|
GOOS: linux
|
|
ldflags:
|
|
- -s -w
|
|
- -X main.version={{.Version}}
|
|
|
|
targets:
|
|
- os: linux
|
|
arch: amd64
|
|
- os: linux
|
|
arch: arm64
|
|
|
|
# Then: build Docker image with the binary
|
|
docker:
|
|
dockerfile: Dockerfile
|
|
registry: ghcr.io
|
|
image: myorg/myservice
|
|
platforms:
|
|
- linux/amd64
|
|
- linux/arm64
|
|
tags:
|
|
- latest
|
|
- "{{.Version}}"
|
|
|
|
# Dockerfile should COPY the built binary:
|
|
#
|
|
# FROM alpine:latest
|
|
# COPY myservice /usr/local/bin/myservice
|
|
# ENTRYPOINT ["/usr/local/bin/myservice"]
|