Files
breakpilot-compliance/pca-platform/heuristic-service/Dockerfile
Benjamin Boenisch 4435e7ea0a Initial commit: breakpilot-compliance - Compliance SDK Platform
Services: Admin-Compliance, Backend-Compliance,
AI-Compliance-SDK, Consent-SDK, Developer-Portal,
PCA-Platform, DSMS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 23:47:28 +01:00

42 lines
739 B
Docker

# Build stage
FROM golang:1.21-alpine AS builder
WORKDIR /app
# Install dependencies
RUN apk add --no-cache git
# Copy go mod files
COPY go.mod ./
# Initialize module and download dependencies
RUN go mod tidy || true
# Copy source code
COPY . .
# Build the binary
RUN CGO_ENABLED=0 GOOS=linux go build -o /heuristic-service ./cmd/server
# Runtime stage
FROM alpine:3.19
WORKDIR /app
# Install ca-certificates for HTTPS
RUN apk add --no-cache ca-certificates wget
# Copy binary from builder
COPY --from=builder /heuristic-service /app/heuristic-service
# Expose port
EXPOSE 8085
# Set environment variables
ENV PORT=8085
ENV GIN_MODE=release
ENV CONFIG_PATH=/app/ai-access.json
# Run the service
CMD ["/app/heuristic-service"]