SolarArbiter / solarforecastarbiter-core

Core data gathering, validation, processing, and reporting package for the Solar Forecast Arbiter
https://solarforecastarbiter-core.readthedocs.io
MIT License
33 stars 21 forks source link

Update Docker build with multistage build and other improvements #814

Open dplarson opened 1 year ago

dplarson commented 1 year ago

I've been working in parallel on enhancements to the build and deployment pipelines for hosting the Arbiter at EPRI, which has introduced some general improvements that can be ported over to this public repo. (I.e., things that are not specific to EPRI's setup but rather are generally applicable to anyone that would run the Docker builds.)

So this issue is to track merging in those enhancements into this repo.

One of the big improvements is switching to a multistage Docker build, which can both reduce the final Docker image size (by ~12% in my testing) and reduce potential security concerns from apt-get package dependencies with CVEs. Other improvements include some reorganization of RUN steps to better take advantage of Docker build/layer caching.