Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Docker build arg for Python dev dependencies #4794

Open
bufke opened this issue Jan 4, 2024 · 0 comments
Open

Idea: Docker build arg for Python dev dependencies #4794

bufke opened this issue Jan 4, 2024 · 0 comments

Comments

@bufke
Copy link
Contributor

bufke commented Jan 4, 2024

Description

Sometimes it's nice to have dev dependencies installed in docker:

  • A developer running locally
  • A CI script that runs a dev-only tool, such as pytest
  • e2e test (requires mongomock)

Other times it's not

  • Production builds
  • CI builds where it isn't necessary and slows it down

A docker build arg would provide a means to control dev dependency installation at build time. Services like kobo compose or ci scripts could enable these by default as needed by the use case.

Advantages

  • For local dev, pytest just works. No special install step.
  • Perhaps slightly faster CI build steps
  • Ease of end to end testing set up

Disadvantages

  • Docker build can result in two different results, which adds complexity

A question raised is - is it bad to offer different dependencies for production/dev? I think this isn't related. When I run pytest, I must install the dev dependencies. So this is already happening and the build arg is not related.

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

No branches or pull requests

1 participant