Skip to content

use cgr.dev/chainguard/wolfi-base#92

Merged
ryanplusplus merged 2 commits intoexercism:mainfrom
keiravillekode:wolfi
May 2, 2026
Merged

use cgr.dev/chainguard/wolfi-base#92
ryanplusplus merged 2 commits intoexercism:mainfrom
keiravillekode:wolfi

Conversation

@keiravillekode
Copy link
Copy Markdown
Contributor

@keiravillekode keiravillekode commented May 2, 2026

We compile Lua with ubuntu, then copy it
across to a much smaller image based on
cgr.dev/chainguard/wolfi-base

552MB becomes 54.7MB

(95 MB with git - was needed by run-integration-tests)

We compile Lua with ubuntu, then copy it
across to a much smaller image based on
cgr.dev/chainguard/wolfi-base

552MB becomes 44.1MB
Comment thread Dockerfile Outdated
apt-get purge --auto-remove && \
apt-get clean
apt-get install -y curl gcc make unzip gnupg && \
rm -rf /var/lib/apt/lists/*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need the rm if the layer gets dropped?

Comment thread Dockerfile
FROM cgr.dev/chainguard/wolfi-base

# Wolfi is glibc-based, so the Lua interpreter and busted's compiled
# C extensions built above run against Wolfi's glibc unmodified.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this require the glibc versions match?
Can lua be compiled with static library linking so you're not depending on the host library?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The builder glibc must not be newer than the runtime glibc.

Now using the same wolfi in the builder, so that possibility (if we updated the builder to a newer ubuntu) goes away.

@IsaacG
Copy link
Copy Markdown
Member

IsaacG commented May 2, 2026

Would it make sense to compile lua directly on wolfi or does wolfi lack the needed dependencies?

Comment thread bin/run-integration-tests.sh Outdated
git clone https://github.com/exercism/lua track
if [ "$1" != "--skip-clone" ]; then
rm -rf track
git clone https://github.com/exercism/lua track
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
git clone https://github.com/exercism/lua track
git clone --depth 1 https://github.com/exercism/lua track

Will be a little quicker, assuming you don't need all the history.

@ryanplusplus ryanplusplus merged commit 341e5e9 into exercism:main May 2, 2026
2 checks passed
@keiravillekode
Copy link
Copy Markdown
Contributor Author

Would it make sense to compile lua directly on wolfi or does wolfi lack the needed dependencies?

Done. I don't understand why, but we now have 54.7MB instead of 44.1MB

@keiravillekode keiravillekode deleted the wolfi branch May 2, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants