From 85e8b631a1d344bde8b18eb1465c7d7f366b780d Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 13 Nov 2019 22:07:59 +0100 Subject: [PATCH] Add Alpine3.9-Ruby2.6 --- lxc-shared/alpine3.9-ruby2.6/lxcfile | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lxc-shared/alpine3.9-ruby2.6/lxcfile diff --git a/lxc-shared/alpine3.9-ruby2.6/lxcfile b/lxc-shared/alpine3.9-ruby2.6/lxcfile new file mode 100644 index 0000000..f7bb12b --- /dev/null +++ b/lxc-shared/alpine3.9-ruby2.6/lxcfile @@ -0,0 +1,33 @@ +IMAGE alpine3.9-ruby2.6_2.6.3-190620 + +LAYER alpine3.9_3.9.4-190620 + +RUN EOF + # Install Ruby runtime dependencies + apk --no-cache add gdbm libressl readline zlib + + # Install Ruby build dependencies + apk --no-cache add --virtual .deps build-base autoconf gdbm-dev libressl-dev linux-headers readline-dev zlib-dev + + # Download and unpack Ruby + mkdir -p /usr/src/ruby + wget http://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.xz -O - | tar xJf - -C /usr/src/ruby --strip-components=1 + + # Compile and install Ruby + cd /usr/src/ruby + autoconf + ./configure --build=x86_64-linux-musl --disable-install-doc --enable-shared + make -j $(getconf _NPROCESSORS_ONLN) + make install + + # Install RubyGems and Bundler + mkdir -p /usr/local/etc + echo -e 'install: --no-document\nupdate: --no-document' >/usr/local/etc/gemrc + gem update --system + + # Cleanup + apk --no-cache del .deps + cd /root + rm -r /usr/src/ruby + rm -rf /root/.gem +EOF