From 0240109149539ec260db6721423463587e1d349c Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sun, 17 May 2026 12:30:04 -0700 Subject: [PATCH 1/3] Changed base to python3.13-alpine3.23 and modified dockerfile and dockerignore to make image smaller. --- .dockerignore | 16 ++++++++++++++-- Dockerfile | 12 +++++++++--- requirements.txt | 2 ++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.dockerignore b/.dockerignore index eb47a50..3cf7d12 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,19 @@ +!bin/run.py +!bin/run.sh +*.pyc +*.pyd +*.pyo .appends +.dockerignore .git +.gitattributes .github .gitignore -.gitattributes -.dockerignore Dockerfile +__pycache__ +bin/run-in-docker.sh +bin/run-tests-in-docker.sh +test/ +venv/ + + diff --git a/Dockerfile b/Dockerfile index 689f471..76bcbb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,15 @@ -FROM python:3.13.5-alpine3.22 +FROM python:3.13-alpine3.23 COPY requirements.txt /requirements.txt -COPY dev-requirements.txt /dev-requirements.txt -RUN pip install -r /requirements.txt -r /dev-requirements.txt +RUN apk update && apk upgrade\ + && apk --no-cache add bash\ + && apk cache clean + +RUN --mount=type=cache,target=/root/.cache/pip\ + PYTHONDONTWRITEBYTECODE=1\ + pip install --no-compile --no-cache\ + -r /requirements.txt COPY . /opt/analyzer diff --git a/requirements.txt b/requirements.txt index d5539ec..f65a10e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,3 @@ pylint ~=4.0.4 +pytest-subtests~=0.14.2 +pytest~=8.4.0 From dca6da2cd497837599c603f556d80969c9bd1097 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sun, 17 May 2026 12:55:01 -0700 Subject: [PATCH 2/3] Changed CI workflow to use run-tests-in-docker.sh. --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15fc34e..01e4943 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,5 +25,5 @@ jobs: - name: Build Docker Image run: docker build -f Dockerfile -t python-analyzer . - - name: Run Tests - run: docker run --entrypoint "pytest" python-analyzer \ No newline at end of file + - name: Run Tests for Analyzer in Docker + run: bin/run-tests-in-docker.sh From 0f64c6b62f2af5868bb3d5ab6a00dbe399467b56 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Sun, 17 May 2026 13:08:33 -0700 Subject: [PATCH 3/3] Update Dockerfile Co-authored-by: Isaac Good --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 76bcbb5..a7183a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,13 @@ FROM python:3.13-alpine3.23 COPY requirements.txt /requirements.txt -RUN apk update && apk upgrade\ - && apk --no-cache add bash\ +RUN apk update && apk upgrade \ + && apk --no-cache add bash \ && apk cache clean -RUN --mount=type=cache,target=/root/.cache/pip\ - PYTHONDONTWRITEBYTECODE=1\ - pip install --no-compile --no-cache\ +RUN --mount=type=cache,target=/root/.cache/pip \ + PYTHONDONTWRITEBYTECODE=1 \ + pip install --no-compile --no-cache \ -r /requirements.txt COPY . /opt/analyzer