-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.with-aseprite
More file actions
45 lines (33 loc) · 1.47 KB
/
Dockerfile.with-aseprite
File metadata and controls
45 lines (33 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Complete Docker image with Aseprite included
# This builds on the CI image to provide a fully self-contained MCP server
# Stage 1: Build the Go binary
FROM golang:1.24.1-alpine AS builder
WORKDIR /build
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source code
COPY . .
# Build the binary
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o pixel-mcp ./cmd/pixel-mcp
# Stage 2: Copy Aseprite from CI image and combine with MCP server
FROM ghcr.io/willibrandon/pixel-mcp-ci:latest
LABEL org.opencontainers.image.source=https://github.com/willibrandon/pixel-mcp
LABEL org.opencontainers.image.description="MCP server for Aseprite with Aseprite binary included"
LABEL org.opencontainers.image.licenses=MIT
LABEL io.modelcontextprotocol.server.name="io.github.willibrandon/pixel-mcp"
# Copy the Go binary from builder
COPY --from=builder /build/pixel-mcp /usr/local/bin/pixel-mcp
# Aseprite is already available at /build/aseprite/build/bin/aseprite from CI image
ENV ASEPRITE_PATH=/build/aseprite/build/bin/aseprite
ENV TEMP_DIR=/tmp/pixel-mcp
ENV TIMEOUT=30
ENV LOG_LEVEL=info
# Create config directory and file
RUN mkdir -p /root/.config/pixel-mcp && \
printf '{\n "aseprite_path": "%s",\n "temp_dir": "%s",\n "timeout": %d,\n "log_level": "%s"\n}\n' \
"$ASEPRITE_PATH" "$TEMP_DIR" "$TIMEOUT" "$LOG_LEVEL" \
> /root/.config/pixel-mcp/config.json
WORKDIR /workspace
# MCP servers communicate over stdio
ENTRYPOINT ["/usr/local/bin/pixel-mcp"]