Skip to content

Commit

Permalink
👷 Avoid creating unnecessary *.pyc files with `PYTHONDONTWRITEBYTEC…
Browse files Browse the repository at this point in the history
…ODE=1` and ensure logs are printed immediately with `PYTHONUNBUFFERED=1` (#192)
  • Loading branch information
estebanx64 authored Mar 21, 2024
1 parent 3a850d4 commit ebc2ad4
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docker-images/python3.10-slim.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.10-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.10.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.10

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.11-slim.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.11.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.11

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.7.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.7

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.8-slim.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.8-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.8.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.8

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.9-slim.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.9-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down
3 changes: 3 additions & 0 deletions docker-images/python3.9.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
FROM python:3.9

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

LABEL maintainer="Sebastian Ramirez <[email protected]>"

COPY requirements.txt /tmp/requirements.txt
Expand Down

0 comments on commit ebc2ad4

Please sign in to comment.