Add Dockerfile and docker-master build target
Two-stage build: golang:1.25-alpine builder, alpine:3.21 runtime. Produces a minimal container image for mcp-master. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
22
Dockerfile.master
Normal file
22
Dockerfile.master
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
ARG VERSION=dev
|
||||
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X main.version=${VERSION}" \
|
||||
-o /mcp-master ./cmd/mcp-master
|
||||
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata
|
||||
|
||||
COPY --from=builder /mcp-master /usr/local/bin/mcp-master
|
||||
|
||||
WORKDIR /srv/mcp-master
|
||||
EXPOSE 9555
|
||||
|
||||
ENTRYPOINT ["mcp-master"]
|
||||
CMD ["server", "--config", "/srv/mcp-master/mcp-master.toml"]
|
||||
5
Makefile
5
Makefile
@@ -32,6 +32,11 @@ proto-lint:
|
||||
buf lint
|
||||
buf breaking --against '.git#branch=master,subdir=proto'
|
||||
|
||||
docker-master:
|
||||
podman build -f Dockerfile.master \
|
||||
--build-arg VERSION=$(shell git describe --tags --always --dirty) \
|
||||
-t mcr.svc.mcp.metacircular.net:8443/mcp-master:$(shell git describe --tags --always --dirty) .
|
||||
|
||||
clean:
|
||||
rm -f mcp mcp-agent mcp-master
|
||||
|
||||
|
||||
Reference in New Issue
Block a user