Skip to content

Conversation

@mattdawkins
Copy link
Member

Summary

  • Replace CMD [".", "/venv/bin/activate", "&&", "exec", "python", "app.py"] with CMD ["/venv/bin/python", "app.py"]
  • JSON exec form does not invoke a shell, so . (source), &&, and exec are passed as literal arguments — the container fails to start
  • Since packages are installed into /venv, invoking /venv/bin/python directly is sufficient and avoids needing to activate the venv

Test plan

  • Build the Docker image and verify the container starts correctly

🤖 Generated with Claude Code

The previous CMD used JSON exec form with shell builtins (. for source,
&&) which does not work — exec form does not invoke a shell so these
are passed as literal arguments. Since pip installed packages into
/venv, we can invoke /venv/bin/python directly without needing to
activate the virtual environment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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