···37373838# Build with CGO enabled for PKCS#11 support
3939# Strip debug symbols to reduce binary size (-s -w)
4040-RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -ldflags="-s -w" -o hsm-operator cmd/hsm-operator/main.go
4040+RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -tags udev -ldflags="-s -w" -o hsm-operator cmd/hsm-operator/main.go
41414242# Build test utility for manual testing/debugging
4343-RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -ldflags="-s -w" -o test cmd/test/main.go
4343+RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -tags udev -ldflags="-s -w" -o test cmd/test/main.go
44444545# Stage 2: Debian Trixie Slim (minimal but functional for USB hardware interaction)
4646# Provides proper runtime environment for libudev USB device enumeration