Skip to content

Instantly share code, notes, and snippets.

@Armen-Jean-Andreasian
Created February 22, 2025 03:28
Show Gist options
  • Save Armen-Jean-Andreasian/a0b18e0e0ed8e682bc523f466ca83795 to your computer and use it in GitHub Desktop.
Save Armen-Jean-Andreasian/a0b18e0e0ed8e682bc523f466ca83795 to your computer and use it in GitHub Desktop.
Generic .dockerignore file for Python projects (extended version)
# Git and version control
.git
.gitignore
# IDE and editor settings
.idea/
.vscode/
*.swp
*.swo
# Python cache and compiled files
__pycache__/
*.pyc
*.pyo
*.pyd
*.pdb
# Virtual environments
venv/
.env
*.env
Pipfile
Pipfile.lock
# Build and dependency caches
*.egg-info/
*.dist-info/
pip-wheel-metadata/
site-packages/
# Docker-related files
.dockerignore
Dockerfile
# OS and system files
.DS_Store
Thumbs.db
*.bak
*.tmp
# Logs and temp files
logs/
*.log
*.out
*.pid
*.seed
nohup.out
# Archives and compressed files
*.tar
*.tar.gz
*.zip
*.rar
*.7z
# Documentation files
README.md
README.rst
LICENSE
CHANGELOG.md
docs/
*.pdf
*.md
# Tests (exclude if not running inside the container)
tests/
test_*.py
*.test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment