cli/docker/Dockerfile.core
Snider c84ce5265f
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
refactor(ci): use reusable docker-publish workflow, switch to Docker Hub
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>
2026-02-21 21:04:44 +00:00

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"]