Skip to content

fix: docker image building management #328

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025
Merged

Conversation

jmeridth
Copy link
Member

@jmeridth jmeridth commented May 27, 2025

Pull Request

Proposed Changes

Tested locally with the following commands:

➜ docker build . --tag test:1
➜ docker run -it --rm --name debug --entrypoint /bin/bash test:1

## inside container

root@3624b051f2c8:/action/workspace# ls -lah
total 44K
drwxr-xr-x 1 root root 4.0K May 27 13:11 .
drwxr-xr-x 1 root root 4.0K May 27 13:11 ..
-rw-r--r-- 1 root root 1.8K Jan  7 10:26 auth.py
-rw-r--r-- 1 root root 4.4K Mar 30 23:25 env.py
-rw-r--r-- 1 root root   68 Apr  4 04:04 requirements.txt
-rwxr-xr-x 1 root root  14K May 27 12:11 stale_repos.py

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run make lint and fix any issues that you have introduced
  • run make test and ensure you have test coverage for the lines you are introducing
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either fix, documentation, enhancement, infrastructure, maintenance or breaking

@jmeridth jmeridth self-assigned this May 27, 2025
@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 13:15
@jmeridth jmeridth requested a review from a team as a code owner May 27, 2025 13:15
@github-actions github-actions bot added the fix label May 27, 2025
Copy link

@Copilot 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 refines the Docker build by using a wildcard for Python files and adds a .dockerignore to shrink the build context.

  • Replace explicit COPY of Python files with *.py
  • Introduce .dockerignore to exclude tests, docs, logs, and other non-app files

Reviewed Changes

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

File Description
Dockerfile Changed COPY requirements.txt stale_repos.py env.py auth.py to use *.py
.dockerignore Added rules to exclude test files, caches, IDE configs, logs, and more

- [x] update Dockerfile to use `*.py` so we don't forget any python files in future
- [x] add .dockerignore to ensure non application files/test files don't get into the container image

Signed-off-by: jmeridth <[email protected]>
@jmeridth jmeridth force-pushed the jm_simplify_dockerfile branch from b70beeb to 3142e45 Compare May 27, 2025 13:18
@jmeridth jmeridth requested a review from zkoppert May 30, 2025 09:12
Copy link
Member

@zkoppert zkoppert left a comment

Choose a reason for hiding this comment

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

✨ Thanks for getting this in and all the right files specified for the container.

@zkoppert zkoppert merged commit 65d9c5c into main May 30, 2025
34 checks passed
@zkoppert zkoppert deleted the jm_simplify_dockerfile branch May 30, 2025 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants