#caching apt-get?

1 messages · Page 1 of 1 (latest)

flat glen
#

I've been trying to use cache_volume to speed up container builds, works great for pip but I'm wondering if anyone has gotten caching working for system deps via apt-get?

onyx portal
#

Note, I am using Dagger Modules, but nothing about caching should be different in this case.

flat glen
#

I actually think this does work now

onyx portal
#

Awesome, I am running it locally to take a peek too.

Curious, have you tried to use the dagger CLI? It adds a nice TUI layer that makes some thing easier to grok in the terminal.

It would basically replace python dagger/run_dbt_spark_tests.py with dagger run python dagger/run_dbt_spark_tests.py

flat glen
#

I haven't tried it yet but will take a look

eager coyote
#

Hey Colin! Dagger works the the same way as Dockerfiles in a sense that it's generally advisable to first install system dependencies before adding your source code so you can get the maximum out of the cache. In your script I see that you're calling with_directory before installing your os reqs. That'll cause any files which change in any of those dirs to invalidate the cache and re-trigger the os_reqs exec

#

cc @flat glen forgot to reply

flat glen
#

that makes a lot of sense, will re-order