Created
February 4, 2024 08:55
-
-
Save casperisfine/e25bbb91e81f7a94aaca9b3c616968c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax = docker/dockerfile:1 | |
FROM ruby:3.3-slim | |
RUN apt-get update && apt-get install -y libjemalloc2 | |
RUN echo "#!/bin/sh\nexport LD_PRELOAD=$(echo /usr/lib/*/libjemalloc.so.2)\nexec \"\$@\"" >> /exec \ | |
&& chmod +x /exec | |
ENTRYPOINT ["/exec"] | |
CMD ["ruby", "-e", "p ENV['LD_PRELOAD']"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment