Some checks failed
Deploy / Test (push) Failing after 1s
Deploy / Build App Image (push) Has been skipped
Deploy / Build Web Image (push) Has been skipped
Deploy / Build Core Image (push) Has been skipped
Deploy / Deploy to Production (push) Has been skipped
Security Scan / security (push) Successful in 16s
Replace inline docker build/push jobs with shared workflow from go-devops. Add proper multi-stage Dockerfile.core (was inline heredoc). Switch registry from dappco.re/osi to docker.io/lthn/. Requires org secrets: REGISTRY_USER, REGISTRY_TOKEN Co-Authored-By: Virgil <virgil@lethean.io>
21 lines
522 B
Text
21 lines
522 B
Text
# Host UK — Core CLI Container
|
|
# Multi-stage build: Go binary in distroless-style Alpine
|
|
#
|
|
# Build: docker build -f docker/Dockerfile.core -t lthn/core:latest .
|
|
|
|
FROM golang:1.26-alpine AS build
|
|
|
|
RUN apk add --no-cache git ca-certificates
|
|
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN go build -trimpath -ldflags '-s -w' -o /core .
|
|
|
|
FROM alpine:3.21
|
|
RUN apk add --no-cache ca-certificates
|
|
COPY --from=build /core /usr/local/bin/core
|
|
RUN adduser -D -h /home/core core
|
|
USER core
|
|
ENTRYPOINT ["core"]
|