Skip to content

Commit 997b917

Browse files
authored
Add Dockerfile and GHCR publishing workflow for MCP server (#350)
Add Dockerfile and GHCR publishing workflow for MCP server
1 parent c07e197 commit 997b917

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.changeset/docker-image.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@transloadit/mcp-server': patch
3+
---
4+
5+
Add Dockerfile and GHCR publishing workflow

.github/workflows/docker-mcp.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Docker MCP Server
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
docker:
9+
name: Build and push MCP server image
10+
if: startsWith(github.event.release.tag_name, '@transloadit/mcp-server@')
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
packages: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Extract version from release tag
19+
id: version
20+
run: |
21+
TAG="${{ github.event.release.tag_name }}"
22+
VERSION="${TAG#@transloadit/mcp-server@}"
23+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
24+
25+
- uses: docker/setup-buildx-action@v3
26+
27+
- uses: docker/login-action@v3
28+
with:
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- uses: docker/build-push-action@v6
34+
with:
35+
context: packages/mcp-server
36+
file: packages/mcp-server/Dockerfile
37+
push: true
38+
tags: |
39+
ghcr.io/transloadit/mcp-server:${{ steps.version.outputs.version }}
40+
ghcr.io/transloadit/mcp-server:latest
41+
labels: |
42+
org.opencontainers.image.title=Transloadit MCP Server
43+
org.opencontainers.image.description=Process video, audio, images, and documents with 86+ cloud media processing robots
44+
org.opencontainers.image.source=https://github.com/transloadit/node-sdk
45+
org.opencontainers.image.version=${{ steps.version.outputs.version }}
46+
org.opencontainers.image.licenses=MIT
47+
platforms: linux/amd64,linux/arm64
48+
cache-from: type=gha
49+
cache-to: type=gha,mode=max

packages/mcp-server/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM node:22-alpine
2+
RUN npm install -g @transloadit/mcp-server@latest
3+
USER node
4+
ENTRYPOINT ["transloadit-mcp", "stdio"]

0 commit comments

Comments
 (0)