# Example Dockerfile for building a Go application with the buildah engine # This is just an example - adjust based on your needs # Build stage FROM golang:1.21 AS builder WORKDIR /app # Copy go mod files COPY go.mod go.sum ./ RUN go mod download # Copy source code COPY . . # Build the applications RUN mkdir -p appview/pages/static && touch appview/pages/static/x RUN CGO_ENABLED=1 go build -o /app/appview.out ./cmd/appview RUN CGO_ENABLED=1 go build -o /app/knot.out ./cmd/knot RUN CGO_ENABLED=1 go build -o /app/spindle.out ./cmd/spindle # Runtime stage FROM debian:bookworm-slim # Install runtime dependencies RUN apt-get update && apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Copy binaries from builder COPY --from=builder /app/appview.out /app/appview COPY --from=builder /app/knot.out /app/knot COPY --from=builder /app/spindle.out /app/spindle # Default command CMD ["/app/appview"]