Skip to content

fix(docker): drop undefined $PYTHONPATH prefix in production Dockerfiles#192

Merged
pavanputhra merged 1 commit into
mainfrom
fix/dockerfile-pythonpath-undefined-var
Jun 7, 2026
Merged

fix(docker): drop undefined $PYTHONPATH prefix in production Dockerfiles#192
pavanputhra merged 1 commit into
mainfrom
fix/dockerfile-pythonpath-undefined-var

Conversation

@pavanputhra

Copy link
Copy Markdown
Contributor

The api and conserver Dockerfiles set PYTHONPATH as ${PYTHONPATH}:/app/..., but the base image (python:3.12-slim) never defines PYTHONPATH. BuildKit therefore emits an UndefinedVar: Usage of undefined variable '$PYTHONPATH' warning on every build, and the resulting value carries a stray leading colon (an empty path entry = current dir).

This drops the ${PYTHONPATH}: prefix:

- ENV PYTHONPATH="${PYTHONPATH}:/app/:/app/common/:/app/api/"
+ ENV PYTHONPATH="/app/:/app/common/:/app/api/"

No behavior change: the listed directories are identical, and /app is already among them, so the implicit current-dir entry was redundant. The dev/test image (docker/Dockerfile) already uses this prefix-free form.

🤖 Generated with Claude Code

The api and conserver Dockerfiles set PYTHONPATH as
`${PYTHONPATH}:/app/...`, but the base image (python:3.12-slim) never sets
PYTHONPATH, so the variable was undefined — BuildKit emitted an UndefinedVar
warning and the value carried a stray leading colon (an empty/cwd path entry).

Drop the prefix. The listed directories are unchanged, and `/app` is already
among them, so the implicit current-dir entry was redundant — no behavior
change, just a clean PYTHONPATH and no warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pavanputhra pavanputhra merged commit 1c8c819 into main Jun 7, 2026
1 check passed
@pavanputhra pavanputhra deleted the fix/dockerfile-pythonpath-undefined-var branch June 7, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant