/ruby-jemalloc

Necessary files and scripts to compile ruby with jemalloc and build a Debian package

Primary LanguageShell

Publishing a new Ruby version with jemalloc

Alright! Check https://www.ruby-lang.org/en/downloads/ for the latest version and SHA hash, and paste them into the definition file. Next up, check the latest OpenSSL sources here https://www.openssl.org/source/ and paste that too into your definition.

Then, build the image:

$ docker build . -t ruby-jemalloc

This may take a while for the first time.

Once the build is complete, run the image with a bash entrypoint:

$ docker run -it ruby-jemalloc --name ruby-build bash

Now you are inside the Docker image and ready to compile Ruby.

Run the following command with the desired Ruby version.

$ ./compile_and_build.sh 3.2.1

This will compile Ruby and build the .deb package. It shows you the path at the very end. From another terminal window, find your docker pid with docker ps and then copy the resulting .deb file to your host computer:

docker cp DOCKER_PID:/tmp/ruby-build/ruby-jemalloc-1548924463.deb .

Don't close your docker machine! It's ephemeral and your newly-built ruby deb will disappear if you do. So POP ANOTHER TERMINAL, because past me didn't do that and that sucked.