Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1K
Visualizações
What is the use of PYTHONUNBUFFERED in docker file?

I was watching a tutorial to dockerize my django application. I did not understand why we use PYTHONUNBUFFERED as environment variable in DockerFile.

Can you please help?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Setting PYTHONUNBUFFERED to a non empty value ensures that the python output is sent straight to terminal (e.g. your container log) without being first buffered and that you can see the output of your application (e.g. django logs) in real time.

This also ensures that no partial output is held in a buffer somewhere and never written in case the python application crashes.

References:

  • https://docs.python.org/3/using/cmdline.html#envvar-PYTHONUNBUFFERED
  • https://alphacoder.xyz/dockerizing-django/
  • https://towardsdatascience.com/how-to-contain-your-first-django-in-docker-and-access-it-from-aws-fdb0081bdf1d
over 4 years ago · Santiago Trujillo Relatório

0

PYTHONUNBUFFERED non empty value force the stdout and stderr streams to be unbuffered. This option has no effect on the stdin stream

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda