Page MenuHomePhabricator

[chronik] Reduce the size of the chronik-agora image
ClosedPublic

Authored by Fabien on Wed, Jan 8, 12:12.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABCd9b81f574a27: [chronik] Reduce the size of the chronik-agora image
Summary

The current container is based off the bitcoin-abc-dev image which is very big. Instead we can copy the binaries to a fresh minimal debian and just install the required dependencies.

This brings the image size from ~11.8GB down to ~173MB.

Test Plan
docker build -t agora .
docker run agora:latest

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Wed, Jan 8, 12:12
Fabien retitled this revision from [chronik] Recuce the size of the chronik-agora image to [chronik] Reduce the size of the chronik-agora image.Wed, Jan 8, 12:14
bytesofman added a subscriber: bytesofman.

brings the image size from ~11.8GB down to ~173MB.

🤯

I'm often taken aback as well by the output from docker system prune -a ... very often it's something like "freed 60 gb of space"

contrib/docker/chronik-agora/Dockerfile
19 ↗(On Diff #52038)

WARNING this should be in sync with the base image from bitcoin-abc-dev !

not sure what this comment means -- is this clarifying that we have to be sure to

COPY --from=builder /installed/bin/* /usr/local/bin/

as we do on line 32?

This revision is now accepted and ready to land.Wed, Jan 8, 12:47
contrib/docker/chronik-agora/Dockerfile
19 ↗(On Diff #52038)

This means that if the bitcoin-abc-dev is no longer based on debian bookworm, this needs to be updated to match otherwise the libraries will differ and bitcoind will refuse to run.

contrib/docker/chronik-agora/Dockerfile
19 ↗(On Diff #52038)