cli/Dockerfile
Snider 260dca0999
Some checks failed
Deploy / build (push) Failing after 4s
Security Scan / security (push) Successful in 14s
refactor: move PHP docker files to core-php, keep only CLI Dockerfile
Move Dockerfile.app, Dockerfile.web, nginx/, php/, and docker-compose
to core-php where they belong. Promote Dockerfile.core to root Dockerfile.
Simplify deploy workflow to only build the CLI image.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-21 21:14:28 +00:00

21 lines
522 B
Docker

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