Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make centos and gnu thin, aligning with musl #22

Open
lloeki opened this issue Nov 20, 2024 · 0 comments
Open

Make centos and gnu thin, aligning with musl #22

lloeki opened this issue Nov 20, 2024 · 0 comments

Comments

@lloeki
Copy link
Contributor

lloeki commented Nov 20, 2024

The targeted global generalisable pattern is:

  • engines/<engine>:<version>: thin image, just the runtime; use this if you don't care what the underlying libc/OS userland is and just want a Ruby runtime at said version; today this is gnu-backed but could transparently become musl-backed in the future.
  • engines/<engine>:<version>-<libc>: thin image, just the runtime; use this if you care what the underlying libc is and just want a Ruby runtime at said version and on said libc.
  • engines/<engine>:<version>-<libc>-<compiler>: fat image, runtime+compiler+whatever necessary to build extensions; use this if you care what the underlying libc is and want a Ruby buildtime environment at said version and on said libc and with said compiler.

The goal is to be able to:

  • Reliably produce minimal images via multistage builds (e.g depend on FROM -gnu-gcc on a bundle install intermediate stage, then copy over /usr/loca/bundle to a final stage that FROMs just -gnu)
  • Be explicit about what a particular image consumer actually depends on
  • Maximise shared layers between images while minimising individual layer and image size

Since various repos and tooling use ruby:2.1 to ruby:3.2 and jruby-9.2 to jruby-9.4 and expect a compiler (i.e as if they were *-gnu-gcc) it was elected to have these "lie" and be aliases to -gnu-gcc for backwards compatibility.

This results in:

  • ruby:2.1-gnu-gcc to ruby:3.2-gnu-gcc, jruby-9.2-gnu-gcc to jruby-9.4-gnu-gcc
  • ruby:2.1-gnu to ruby:3.2-gnu, jruby-9.2-gnu to jruby-9.4-gnu, alias tags of the above
  • ruby:2.1 to ruby:3.2, jruby-9.2 to jruby-9.4, alias tags of the above
  • ruby:2.1-musl to ruby:3.2-musl, jruby-9.2-musl to jruby-9.4-musl, thin alpine-based images without compiler
  • ruby:2.1-musl-gcc to ruby:3.2-musl-gcc, jruby-9.2-musl-gcc to jruby-9.4-musl-gcc, based off of the above (FROM), with gcc

engines/<engine>:<version>-centos and engines/<engine>:<version>-centos-gcc follow the same aliasing as for gnu.

Task is to make:

  • engines/<engine>:<version>-gnu thin
  • engines/<engine>:<version>-gnu-gcc fat
  • engines/<engine>:<version>-centos thin
  • engines/<engine>:<version>-centos-gcc fat

Requires: #26

@lloeki lloeki changed the title Align centos and gnu with musl Make centos and gnu thin, aligning with musl Nov 20, 2024
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

No branches or pull requests

1 participant