hirosystems / stacks-subnets

Stacks Subnets: a layer-2 scaling solution for Stacks, intended for high-throughput, low-latency workloads
http://docs.hiro.so
GNU General Public License v3.0
52 stars 13 forks source link

chore: Update Dockerfiles to use BuildKit and enable caching #280

Closed jbencin closed 1 year ago

jbencin commented 1 year ago

Description

Update Dockerfiles to use BuildKit, which allows for caching and other features to speed up builds

This PR contains some additional minor changes:

Additional info (benefits, drawbacks, caveats)

Using BuildKit allows for all the Cargo dependencies and build files to persist between builds. Instead of spending ~10 minutes building from scratch each time, repeat builds now happen almost instantly:

❯ DOCKER_BUILDKIT=1 time docker build .
...
real    0m2.168s
user    0m0.383s
sys     0m0.124s

Checklist