Skip to content

Commit ebc2ad4

Browse files
authored
đź‘· Avoid creating unnecessary *.pyc files with PYTHONDONTWRITEBYTECODE=1 and ensure logs are printed immediately with PYTHONUNBUFFERED=1 (#192)
1 parent 3a850d4 commit ebc2ad4

9 files changed

+27
-0
lines changed

‎docker-images/python3.10-slim.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.10-slim
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.10.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.10
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.11-slim.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.11-slim
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.11.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.11
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.7.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.7
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.8-slim.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.8-slim
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.8.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.8
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.9-slim.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.9-slim
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

‎docker-images/python3.9.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM python:3.9
22

3+
ENV PYTHONDONTWRITEBYTECODE=1
4+
ENV PYTHONUNBUFFERED=1
5+
36
LABEL maintainer="Sebastian Ramirez <[email protected]>"
47

58
COPY requirements.txt /tmp/requirements.txt

0 commit comments

Comments
 (0)