or approximate, because apk wants the -rcX too
This commit is contained in:
parent
4cea1b3d1c
commit
4412a052d3
2 changed files with 6 additions and 6 deletions
|
@ -8,6 +8,7 @@ pipeline:
|
|||
- latest
|
||||
build_args:
|
||||
- RUBY_VERSION=${RUBY_VERSION}
|
||||
- RUBY_PATCH=${RUBY_PATCH}
|
||||
- ALPINE_VERSION=${ALPINE_VERSION}
|
||||
- BASE_IMAGE=registry.nulo.in/sutty/monit
|
||||
username: sutty
|
||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -1,13 +1,12 @@
|
|||
ARG ALPINE_VERSION=3.13.6
|
||||
ARG RUBY_VERSION=2.7
|
||||
ARG RUBY_PATCH=5
|
||||
ARG BASE_IMAGE=alpine
|
||||
ARG EMAIL=monit@sutty.nl
|
||||
FROM ${BASE_IMAGE}:${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 patch
|
||||
RUN test "${RUBY_VERSION}.${RUBY_PATCH}" = `ruby -e 'puts RUBY_VERSION'`
|
||||
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/
|
||||
|
@ -15,11 +14,11 @@ RUN cd /usr/lib/ruby/${RUBY_VERSION}.0 && patch -Np 0 -i /tmp/rubygems-platform-
|
|||
|
||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||
ARG ALPINE_VERSION
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
ARG RUBY_VERSION
|
||||
ARG RUBY_PATCH
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
# Install ruby and extracted gems and copy patched rubygems
|
||||
RUN apk add --no-cache tzdata ruby && rm /usr/lib/ruby/${RUBY_VERSION}.0/rubygems.rb
|
||||
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/
|
||||
|
|
Loading…
Reference in a new issue