Skip to content

Conversation

@jmeridth
Copy link
Member

  • add .dockerignore to ensure non application files/test files don't get into the container image

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

Pull Request

Proposed Changes

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 bug, documentation, enhancement, infrastructure, maintenance or breaking

@jmeridth jmeridth self-assigned this May 31, 2025
Copilot AI review requested due to automatic review settings May 31, 2025 21:16
@jmeridth jmeridth requested a review from a team as a code owner May 31, 2025 21:16
@github-actions github-actions bot added the fix label May 31, 2025
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

A .dockerignore file is added to exclude non-application files and test files from the Docker build context.

  • Add patterns to ignore Python bytecode, logs, IDE settings, dependency directories, and test files.
  • Exclude common workspace and Git metadata from image builds.

- [x] add .dockerignore to ensure non application files/test files don't get into the container image

Tested locally with the following commands:

```bash
➜ 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
```

Signed-off-by: jmeridth <[email protected]>
@zkoppert zkoppert merged commit a12cd4f into main Jun 1, 2025
29 checks passed
@zkoppert zkoppert deleted the jm_dockerignore branch June 1, 2025 06:16
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.

3 participants