opendatacube / datacube-explorer

Web-based exploration of Open Data Cube collections
Apache License 2.0
54 stars 31 forks source link

Dockerfile: remove git after use #588

Closed pjonsson closed 1 month ago

pjonsson commented 2 months ago

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 commented 2 months ago

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?

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pjonsson commented 2 months ago

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.

pjonsson commented 1 month ago

@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.