Spotter-VM/alpine3.9-ruby2.4/lxcfile
Disassembler ce325cf3d0
Squashed commit of the following:
- Bump basic OS to Alpine 3.9
 - Restructure repo and add layer versioning
 - Use JSON for all metadata
 - Merge abuild branch (but without abuild)
2019-02-26 20:24:02 +01:00

34 lines
984 B
Plaintext

IMAGE build
LAYER shared/alpine3.9
LAYER shared/alpine3.9-ruby2.4
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.4/ruby-2.4.5.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