- 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.
24 lines
479 B
Docker
24 lines
479 B
Docker
# Dockerfile.worker
|
|
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/worker ./cmd/worker
|
|
|
|
# Use Google Disroless static image for minimal size and security
|
|
FROM gcr.io/distroless/static:nonroot
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/worker .
|
|
|
|
# Non-root user for security
|
|
USER nonroot:nonroot
|
|
|
|
CMD ["./worker"]
|