Skip to content

Add Dockerfile and CI for container image builds#15

Merged
ian-flores merged 7 commits intomainfrom
vip-container-image
Feb 23, 2026
Merged

Add Dockerfile and CI for container image builds#15
ian-flores merged 7 commits intomainfrom
vip-container-image

Conversation

@ian-flores
Copy link
Collaborator

Summary

  • Add Dockerfile based on mcr.microsoft.com/playwright/python:v1.52.0-noble with uv for package management
  • Add .github/workflows/docker.yml CI pipeline to build and push to ghcr.io/posit-dev/vip
  • Add .dockerignore to exclude non-essential files from the image

Details

This enables running VIP as a container image, which is needed for Kubernetes Job-based verification in PTD deployments (ptd verify).

Image details:

  • Base: mcr.microsoft.com/playwright/python:v1.52.0-noble (includes Chromium)
  • Package manager: uv (copied from ghcr.io/astral-sh/uv:latest)
  • Entrypoint: uv run pytest — additional args can be appended
  • Config: mount vip.toml at /app/vip.toml

CI triggers:

  • Push to main → tagged latest
  • Push tag v* → semver image tags (1.0.0, 1.0, 1)
  • Pull requests → build only, no push

Test plan

  • Verify Docker image builds locally with docker build -t vip:test .
  • Verify image runs: docker run --rm vip:test --co (should list test cases)
  • Verify CI workflow triggers on PR

@github-actions
Copy link

github-actions bot commented Feb 23, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-02-23 22:17 UTC

The prefix={{branch}} template resolves empty on PRs, producing
an invalid tag like ":-949cd9f". Use the default sha prefix instead.
Hatchling validates readme = "README.md" from pyproject.toml
during build. The *.md exclusion in .dockerignore was removing it.
@ian-flores ian-flores marked this pull request as ready for review February 23, 2026 21:03
@ian-flores ian-flores requested a review from statik as a code owner February 23, 2026 21:03
Copilot AI review requested due to automatic review settings February 23, 2026 21:03
Copy link
Collaborator

@statik statik left a comment

Choose a reason for hiding this comment

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

nice!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Docker containerization support to enable running VIP tests as Kubernetes Jobs in PTD deployments. The implementation includes a multi-stage Dockerfile optimized for layer caching, a GitHub Actions workflow for automated image builds and publishing to GHCR, and a .dockerignore file to minimize image size.

Changes:

  • Added Dockerfile based on Microsoft's Playwright Python image with uv package management
  • Added GitHub Actions workflow for building and pushing container images to ghcr.io
  • Added .dockerignore to exclude non-essential files from the Docker context

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
Dockerfile Multi-stage build with uv package manager, Playwright browser installation, and pytest entrypoint
.github/workflows/docker.yml CI pipeline for building and pushing images with semver tagging on main branch and version tags
.dockerignore Excludes development files, documentation, and test framework code to reduce image size

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,30 @@
# VIP - Verified Installation of Posit
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

The PR description mentions using --co as a pytest option to list test cases, but this is not a valid pytest option. The correct option is --collect-only (or its short form --co is actually not valid - pytest only accepts --collect-only). This should be corrected in the test plan.

Copilot uses AI. Check for mistakes.
ian-flores and others added 3 commits February 23, 2026 13:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ian-flores ian-flores enabled auto-merge (squash) February 23, 2026 21:34
The Playwright base image already has an 'ubuntu' user at UID 1000.
Reuse it instead of trying to create a new user at the same UID.
@ian-flores ian-flores merged commit 18ac55b into main Feb 23, 2026
8 checks passed
@ian-flores ian-flores deleted the vip-container-image branch February 23, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants