Files
Sankofa/crossplane-provider-proxmox/Dockerfile
defiQUG 9daf1fd378 Apply Composer changes: comprehensive API updates, migrations, middleware, and infrastructure improvements
- Add comprehensive database migrations (001-024) for schema evolution
- Enhance API schema with expanded type definitions and resolvers
- Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth
- Implement new services: AI optimization, billing, blockchain, compliance, marketplace
- Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage)
- Update Crossplane provider with enhanced VM management capabilities
- Add comprehensive test suite for API endpoints and services
- Update frontend components with improved GraphQL subscriptions and real-time updates
- Enhance security configurations and headers (CSP, CORS, etc.)
- Update documentation and configuration files
- Add new CI/CD workflows and validation scripts
- Implement design system improvements and UI enhancements
2025-12-12 18:01:35 -08:00

45 lines
1.3 KiB
Docker

FROM golang:1.21-alpine AS builder
WORKDIR /workspace
# Copy go mod files
COPY go.mod go.mod
COPY go.sum go.sum
# Download dependencies and update go.sum
RUN go mod download && go mod tidy
# Install controller-gen for code generation (compatible with Go 1.21)
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0
# Copy source code
COPY . .
# Generate code (DeepCopy methods)
RUN controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./apis/v1alpha1/..."
# Fix generated code - Spec/Status types don't have DeepCopyInto, so use value assignment
RUN if [ -f "apis/v1alpha1/zz_generated.deepcopy.go" ]; then \
sed -i.bak \
-e 's/in\.Spec\.DeepCopyInto(&out\.Spec)/out.Spec = in.Spec/g' \
-e 's/in\.Status\.DeepCopyInto(&out\.Status)/out.Status = in.Status/g' \
-e 's/in\.Spec\.DeepCopyInto(out\.Spec)/out.Spec = in.Spec/g' \
-e 's/in\.Status\.DeepCopyInto(out\.Status)/out.Status = in.Status/g' \
apis/v1alpha1/zz_generated.deepcopy.go && \
rm -f apis/v1alpha1/zz_generated.deepcopy.go.bak; \
fi
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o provider ./cmd/provider
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /workspace/provider .
ENTRYPOINT ["./provider"]