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

Install git in runtime container #446

Merged
merged 1 commit into from
May 1, 2024
Merged

Conversation

joeshannon
Copy link
Contributor

This is required for installing python packages at runtime.

It was previously present in the non-slim python container used before but this was accidentally removed with the switch to the copier template.

Fixes #445.

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.16%. Comparing base (0a634dc) to head (2385dd5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #446   +/-   ##
=======================================
  Coverage   90.16%   90.16%           
=======================================
  Files          41       41           
  Lines        1708     1708           
=======================================
  Hits         1540     1540           
  Misses        168      168           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

@joeshannon joeshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should work, I did look in the action logs though and it wasn't clear where git was being installed.

Also the apt in the container above has && rm -rf /var/lib/apt/lists/* at the end of it - do we really need this here too?

@joeshannon
Copy link
Contributor Author

I think this should work, I did look in the action logs though and it wasn't clear where git was being installed.

It was being installed but I missed it before as it seemed to be building the runtime container in parallel with the developer container.

@joeshannon
Copy link
Contributor Author

The copier template has && rm -rf /var/lib/apt/lists/* after the apt-get.

@coretl @gilesknap Is this some sort of best practice for using apt in Dockerfiles? Should I include it here too?

@coretl
Copy link
Contributor

coretl commented May 1, 2024

Yes, reading the docker best practices you get examples that look like that:
https://docs.docker.com/develop/develop-images/guidelines/#sort-multi-line-arguments

This is required for installing python packages at runtime.

It was previously present in the non-slim python container used before
but this was accidentally removed with the switch to the copier
template.

Fixes #445.
@joeshannon joeshannon force-pushed the add-git-to-runtime-container branch from c945816 to 2385dd5 Compare May 1, 2024 16:04
@joeshannon
Copy link
Contributor Author

Thanks!

@joeshannon joeshannon merged commit 25e9028 into main May 1, 2024
24 checks passed
@joeshannon joeshannon deleted the add-git-to-runtime-container branch May 1, 2024 16:09
ZohebShaikh pushed a commit that referenced this pull request May 7, 2024
This is required for installing python packages at runtime.

It was previously present in the non-slim python container used before
but this was accidentally removed with the switch to the copier
template.

Fixes #445.
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.

Git required in container
3 participants