-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 1017 Bytes
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 1017 Bytes
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
# VIP - Verified Installation of Posit
# Container image for running VIP tests as Kubernetes Jobs
FROM mcr.microsoft.com/playwright/python:v1.52.0-noble
# Install uv for fast Python package management
COPY --from=ghcr.io/astral-sh/uv:0.6.3 /uv /uvx /usr/local/bin/
WORKDIR /app
# Copy dependency files first for layer caching
COPY pyproject.toml uv.lock ./
# Install dependencies (without the project itself yet)
RUN uv sync --frozen --no-install-project
# Copy the full project
COPY . .
# Install the project itself
RUN uv sync --frozen
# Install playwright browsers (chromium is already in the base image, but ensure deps)
RUN uv run playwright install --with-deps chromium
# Run as the existing non-root user from the base image (ubuntu, UID 1000)
RUN chown -R ubuntu:ubuntu /app
USER ubuntu
# Default entrypoint runs pytest
# Config file should be mounted at /app/vip.toml
ENTRYPOINT ["uv", "run", "pytest"]
# Default args: run all tests with short tracebacks and verbose output
CMD ["--tb=short", "-v"]