containers-sdk-ruby/Dockerfile

29 lines
1,004 B
Text
Raw Normal View History

2022-02-27 15:08:01 +00:00
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/containers-sdk
ARG EMAIL=monit@sutty.nl
FROM alpine:${ALPINE_VERSION} as build
ARG RUBY_VERSION=2.7
ARG RUBY_PATCH=5
ENV EMAIL ${EMAIL:-monit@sutty.nl}
RUN apk add --no-cache ruby~${RUBY_VERSION}.${RUBY_PATCH} patch
# Patch rubygems to install x86_64-linux-musl gems
COPY ./rubygems-platform-musl.patch /tmp/
RUN cd /usr/lib/ruby/${RUBY_VERSION}.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch || true
2021-09-29 18:40:28 +00:00
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
2022-02-27 15:08:01 +00:00
ARG ALPINE_VERSION
2019-09-10 23:10:18 +00:00
MAINTAINER "f <f@sutty.nl>"
2022-02-27 15:08:01 +00:00
ARG RUBY_VERSION
ARG RUBY_PATCH
2019-09-10 23:24:08 +00:00
2022-02-27 15:08:01 +00:00
# Install ruby and extracted gems and copy patched rubygems
RUN apk add --no-cache tzdata ruby~${RUBY_VERSION}.${RUBY_PATCH} && rm /usr/lib/ruby/${RUBY_VERSION}.0/rubygems.rb
RUN apk add --no-cache ruby-json ruby-bigdecimal ruby-rake ruby-bundler ruby-irb ruby-io-console ruby-etc
COPY --from=build /usr/lib/ruby/${RUBY_VERSION}.0/rubygems.rb /usr/lib/ruby/${RUBY_VERSION}.0/
2019-09-10 23:24:08 +00:00
2022-02-27 15:08:01 +00:00
RUN apk add --no-cache ruby-dev
2019-09-18 16:43:54 +00:00
2019-09-10 23:24:08 +00:00
ENTRYPOINT /bin/sh