Files
gronod 05e62048d8
Build and publish / Test and build (windows) (push) Failing after 14s
Build and publish / Test and build (darwin) (push) Successful in 3m34s
Build and publish / Test and build (linux) (push) Canceled after 0s
Build and publish / Build and publish Docker image (push) Canceled after 0s
Add Gitea CI builds and container publishing
2026-09-18 21:04:38 +01:00

20 lines
570 B
Docker

# syntax=docker/dockerfile:1
ARG GO_VERSION=1.27.1
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
ARG TARGETOS
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
go build -trimpath -ldflags="-s -w" -o /out/ombi-mcp ./cmd/ombi-mcp
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /out/ombi-mcp /ombi-mcp
USER 65532:65532
EXPOSE 8080
ENTRYPOINT ["/ombi-mcp"]