diff --git a/api/Dockerfile b/api/Dockerfile index 89fb8607f..79ab8afef 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -13,6 +13,7 @@ RUN poetry export --with dev --without-hashes > dev-requirements.txt FROM alpine:3.17 as builder ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 RUN \ echo 'installing dependencies' && \ @@ -73,6 +74,7 @@ RUN \ FROM alpine:3.17 as image ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONUNBUFFERED=1 COPY --from=builder /venv /venv # emulate activation by prefixing PATH diff --git a/changes/changelog.d/do-not-buffer-python-stdout-stderr-in-docker.enhancement b/changes/changelog.d/do-not-buffer-python-stdout-stderr-in-docker.enhancement new file mode 100644 index 000000000..e61dacc98 --- /dev/null +++ b/changes/changelog.d/do-not-buffer-python-stdout-stderr-in-docker.enhancement @@ -0,0 +1 @@ +Don't buffer python stdout/err in docker