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

Dockerfile: remove git after use #588

Merged
merged 1 commit into from
May 7, 2024

Conversation

pjonsson
Copy link
Contributor

@pjonsson pjonsson commented Apr 8, 2024

I shifted some things around to simplify
before pushing, but missed that the check
on ENVIRONMENT ended up before
the declaration of the argument.

Even the deployment container needs git
since setuptools_scm requires it, so
remove git and git-man after the
installation has completed.

This avoids CVE-2018-1000021.


📚 Documentation preview 📚: https://datacube-explorer--588.org.readthedocs.build/en/588/

@pjonsson
Copy link
Contributor Author

pjonsson commented Apr 8, 2024

I have to run now, will look at the failure tomorrow. And just in case, can someone try to retrigger the failing job and see if it works itself out?

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.32%. Comparing base (aa0d9f3) to head (3735376).
Report is 26 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #588      +/-   ##
===========================================
+ Coverage    86.29%   86.32%   +0.03%     
===========================================
  Files           26       26              
  Lines         3451     3466      +15     
===========================================
+ Hits          2978     2992      +14     
- Misses         473      474       +1     

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

I shifted some things around to simplify
before pushing, but missed that the check
on ENVIRONMENT ended up before
the declaration of the argument.

Even the deployment container needs git
since setuptools_scm requires it, so
remove git and git-man after the
installation has completed.

This avoids CVE-2018-1000021.
@pjonsson pjonsson force-pushed the declare-before-use branch from 4c6834b to 3735376 Compare April 9, 2024 10:40
@pjonsson pjonsson changed the title Dockerfile: declare ARG before use Dockerfile: remove git after use Apr 9, 2024
@pjonsson
Copy link
Contributor Author

pjonsson commented Apr 9, 2024

The issue was that testing started despite the image not being built properly.

That touches the parts I'm already changing, so will fix error code propagation after this is merged.

Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

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

Holy moly, this Dockerfile is crazy complicated.

Thanks

@omad omad merged commit 441c2ef into opendatacube:develop May 7, 2024
7 checks passed
@pjonsson pjonsson deleted the declare-before-use branch May 8, 2024 06:26
@pjonsson
Copy link
Contributor Author

@omad Fix for the build error masking is in #596.

And I agree with your assessment, a build/app container setup must be >50% of the usages of Docker, and it's still really complicated if one cares about build performance as well as the final result. Personally I've gone monorepo and a single Dockerfile with different build-args to produce all images, and while it's sometimes a bit more difficult to do some things that way, at least I only have to do them once and I can sleep at night since I don't have to worry I forgot to update some repository.

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.

2 participants