Build and publish / Test and build (darwin) (push) Successful in 2m19s
Build and publish / Test and build (windows) (push) Successful in 2m54s
Build and publish / Test and build (linux) (push) Successful in 4m4s
Build and publish / Build and publish Docker image (push) Successful in 2m34s
26 lines
828 B
Docker
26 lines
828 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/emby-mcp ./cmd/emby-mcp
|
|
|
|
FROM scratch
|
|
ARG VERSION=1.0.0
|
|
LABEL org.opencontainers.image.title="emby-mcp" \
|
|
org.opencontainers.image.version="$VERSION" \
|
|
org.opencontainers.image.description="Emby Model Context Protocol server"
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
COPY --from=build /out/emby-mcp /emby-mcp
|
|
USER 65532:65532
|
|
ENV MCP_TRANSPORT=http \
|
|
MCP_LISTEN_ADDR=0.0.0.0:8080
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/emby-mcp"]
|