- Use Google Distroless images for all services (Go & Node.js). - Standardize documentation with [PROJECT-NAME].md. - Add .dockerignore and .gitignore to all projects. - Remove docker-compose.yml in favor of docker run instructions. - Fix Go version and dependency issues in observability, repo-integrations, and security-governance. - Add Podman support (fully qualified image names). - Update Dashboard to use Node.js static server for Distroless compatibility.
25 lines
502 B
Docker
25 lines
502 B
Docker
# Dockerfile
|
|
FROM docker.io/library/golang:1.23-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
# Build with optimization flags
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o /app/repo-integrations-core ./cmd/api
|
|
|
|
# Use Google Distroless static image for minimal size and security
|
|
FROM gcr.io/distroless/static:nonroot
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/repo-integrations-core .
|
|
|
|
USER nonroot:nonroot
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["./repo-integrations-core"]
|