theskumar / theskumar/python-dotenv
Avoid ending up with double quoted variables in docker.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 8.9k
- Forks
- 581
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Related to the buggy way docker handles env-files
see https://github.com/docker/cli/issues/3630#issuecomment-2599705392
When you quote variables in your .env (which IHMO is a best practice):
FOO=BAR
FOO1='BAR1'
FOO2="BAR2"
and then you run docker via docker run --env-file .env
you end up with literal quoted variables inside docker:
FOO=BAR
FOO1='BAR1'
FOO2="BAR2"
This is incorrect, and should be fixed in docker.
and in python via python-dotenv, they become double quoted variables
>>> os.getenv("FOO")
'BAR'
>>> os.getenv("FOO1")
"'BAR1'"
>>> os.getenv("FOO2")
'"BAR2"'
As a work-around for the root-cause, could be avoid ending up with double-quoted variables in python?
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
The issue names no repository file, test, or entry point. Reproduce the quoted .env examples with python-dotenv and compare the resulting values with the expected behavior described in the issue. Confirm the intended handling of single- and double-quoted assignments, then verify the result with an appropriate repository test or documented outcome.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- docker, python
- Área
- devops, tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100