Python Unbuffered (#2534)

* Update Dockerfile

Using pythonunbuffered so that  print() statements and log messages will immediately appear in the logs.

* Update docs/serving/samples/hello-world/helloworld-python/Dockerfile

Update comment

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update README.md

Adding the pythonunbuffered to readme to fix test

* Update docs/serving/samples/hello-world/helloworld-python/README.md

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* Update README.md

Adding newline - code has to match Dockerfile

Co-authored-by: Victor Agababov <vagababov@gmail.com>
Co-authored-by: Matt Moore <mattmoor@vmware.com>
This commit is contained in:
Dina Graves Portman 2020-06-04 12:35:18 -07:00 committed by GitHub
parent b20bb9cf17
commit 2ba840fbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,9 @@
# https://hub.docker.com/_/python # https://hub.docker.com/_/python
FROM python:3.7-slim FROM python:3.7-slim
# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
# Copy local code to the container image. # Copy local code to the container image.
ENV APP_HOME /app ENV APP_HOME /app
WORKDIR $APP_HOME WORKDIR $APP_HOME

View File

@ -55,6 +55,9 @@ cd knative-docs/docs/serving/samples/hello-world/helloworld-python
# https://hub.docker.com/_/python # https://hub.docker.com/_/python
FROM python:3.7-slim FROM python:3.7-slim
# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
# Copy local code to the container image. # Copy local code to the container image.
ENV APP_HOME /app ENV APP_HOME /app
WORKDIR $APP_HOME WORKDIR $APP_HOME