Skip to content

Commit 4ff3987

Browse files
committed
update dockerfile
1 parent 4361d61 commit 4ff3987

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,13 @@ jobs:
128128
- name: Build and push container image
129129
run: |
130130
# Build the image
131-
podman build -t "ghcr.io/${{ github.repository }}/vtk-mcp:latest" \
132-
-t "ghcr.io/${{ github.repository }}/vtk-mcp:${{ github.sha }}" \
133-
-t "ghcr.io/${{ github.repository }}/vtk-mcp:${{ steps.slug.outputs.SHORT_SHA }}" \
131+
GITHUB_REPOSITORY="$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')"
132+
podman build -t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:latest" \
133+
-t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ github.sha }}" \
134+
-t "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ steps.slug.outputs.SHORT_SHA }}" \
134135
.
135136
136137
# Push all tags
137-
podman push "ghcr.io/${{ github.repository }}/vtk-mcp:latest"
138-
podman push "ghcr.io/${{ github.repository }}/vtk-mcp:${{ github.sha }}"
139-
podman push "ghcr.io/${{ github.repository }}/vtk-mcp:${{ steps.slug.outputs.SHORT_SHA }}"
138+
podman push "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:latest"
139+
podman push "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ github.sha }}"
140+
podman push "ghcr.io/${GITHUB_REPOSITORY}/vtk-mcp:${{ steps.slug.outputs.SHORT_SHA }}"

Dockerfile

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
11
LABEL org.opencontainers.image.title="VTK MCP Server"
22
LABEL org.opencontainers.image.description="Model Context Protocol server for VTK class documentation"
33
LABEL org.opencontainers.image.source="https://github.com/kitware/vtk-mcp"
4+
LABEL org.opencontainers.image.authors="Vicente Adolfo Bolea Sanchez <[email protected]>"
45
LABEL org.opencontainers.image.licenses="MIT"
56
LABEL org.opencontainers.image.documentation="https://github.com/kitware/vtk-mcp/blob/main/README.md"
67

78
FROM python:3.12-slim
89

9-
WORKDIR /app
10-
1110
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
1211
PIP_NO_CACHE_DIR=1 \
1312
PYTHONDONTWRITEBYTECODE=1 \
1413
PYTHONUNBUFFERED=1
1514

1615
# Install system dependencies for VTK
17-
RUN apt update && apt install -y \
18-
libgl1-mesa-glx \
19-
libglib2.0-0 \
20-
libgomp1 \
21-
libsm6 \
22-
libxext6 \
23-
libxrender-dev
16+
RUN apt update && \
17+
apt install --no-install-recommends --no-install-suggests -y \
18+
libgl1-mesa-dev \
19+
libxrender-dev/stable
2420

21+
WORKDIR /app
2522
COPY . .
2623
RUN pip install --upgrade pip && \
2724
pip install --verbose .
2825

29-
# Create non-root user for security
30-
#RUN useradd --create-home --shell /bin/bash --uid 1000 vtk-user && \
31-
# chown -R vtk-user:vtk-user /app
32-
#USER vtk-user
33-
3426
EXPOSE 8000
3527

3628
CMD ["vtk-mcp-server", "--transport", "http", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)