Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/docker-image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@transloadit/mcp-server': patch
---

Add Dockerfile and GHCR publishing workflow
49 changes: 49 additions & 0 deletions .github/workflows/docker-mcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker MCP Server

on:
release:
types: [published]

jobs:
docker:
name: Build and push MCP server image
if: startsWith(github.event.release.tag_name, '@transloadit/mcp-server@')
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- name: Extract version from release tag
id: version
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#@transloadit/mcp-server@}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v6
with:
context: packages/mcp-server
file: packages/mcp-server/Dockerfile
push: true
tags: |
ghcr.io/transloadit/mcp-server:${{ steps.version.outputs.version }}
ghcr.io/transloadit/mcp-server:latest
labels: |
org.opencontainers.image.title=Transloadit MCP Server
org.opencontainers.image.description=Process video, audio, images, and documents with 86+ cloud media processing robots
org.opencontainers.image.source=https://github.com/transloadit/node-sdk
org.opencontainers.image.version=${{ steps.version.outputs.version }}
org.opencontainers.image.licenses=MIT
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
4 changes: 4 additions & 0 deletions packages/mcp-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM node:22-alpine
RUN npm install -g @transloadit/mcp-server@latest
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pin npm package version in Docker image build

The image always installs @transloadit/mcp-server@latest, so the binary inside the container is not tied to the GitHub release tag being published. If latest differs from the release version (for example, rerunning an older release workflow or any dist-tag drift), ghcr.io/transloadit/mcp-server:<release-version> will contain the wrong server code, which breaks version correctness and reproducibility for users pulling pinned image tags.

Useful? React with 👍 / 👎.

USER node
ENTRYPOINT ["transloadit-mcp", "stdio"]