Skip to content

Commit b2524ef

Browse files
authored
Merge pull request #320 from genlayer-foundation/JoaquinBN/fix-logging-pii
Fix stale Python bytecode in Docker images
2 parents c5987da + 4be1dfa commit b2524ef

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

backend/.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Python
1+
# Python - exclude ALL __pycache__ directories (not just root level)
2+
**/__pycache__/
23
__pycache__/
34
*.py[cod]
45
*$py.class

backend/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ RUN pip install --no-cache-dir -r requirements.txt
2222
# Copy project
2323
COPY . .
2424

25+
# Remove any cached Python bytecode that might have been copied
26+
# This ensures fresh .py files are always used
27+
RUN find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
28+
RUN find . -name "*.pyc" -delete 2>/dev/null || true
29+
2530
# Make startup script executable
2631
RUN chmod +x startup.sh
2732

0 commit comments

Comments
 (0)