This commit is contained in:
parent
8cbc838790
commit
f6215e8bfe
2 changed files with 29 additions and 15 deletions
|
@ -4,9 +4,11 @@ pipeline:
|
||||||
registry: registry.nulo.in
|
registry: registry.nulo.in
|
||||||
repo: registry.nulo.in/sutty/containers-sdk-ruby
|
repo: registry.nulo.in/sutty/containers-sdk-ruby
|
||||||
tags:
|
tags:
|
||||||
- ${ALPINE_VERSION}
|
- ${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
|
||||||
- latest
|
- latest
|
||||||
build_args:
|
build_args:
|
||||||
|
- RUBY_VERSION=${RUBY_VERSION}
|
||||||
|
- RUBY_PATCH=${RUBY_PATCH}
|
||||||
- ALPINE_VERSION=${ALPINE_VERSION}
|
- ALPINE_VERSION=${ALPINE_VERSION}
|
||||||
- BASE_IMAGE=registry.nulo.in/sutty/containers-sdk
|
- BASE_IMAGE=registry.nulo.in/sutty/containers-sdk
|
||||||
username: sutty
|
username: sutty
|
||||||
|
@ -15,8 +17,8 @@ pipeline:
|
||||||
when:
|
when:
|
||||||
branch: antifascista
|
branch: antifascista
|
||||||
event: push
|
event: push
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
ALPINE_VERSION:
|
ALPINE_VERSION:
|
||||||
- 3.13.6
|
- 3.13.7
|
||||||
- 3.14.2
|
- 3.14.3
|
||||||
|
- 3.15.0
|
||||||
|
|
34
Dockerfile
34
Dockerfile
|
@ -1,16 +1,28 @@
|
||||||
ARG BASE_IMAGE=sutty/sdk
|
ARG ALPINE_VERSION=3.13.6
|
||||||
ARG ALPINE_VERSION=3.13.6
|
ARG BASE_IMAGE=sutty/containers-sdk
|
||||||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
ARG EMAIL=monit@sutty.nl
|
||||||
MAINTAINER "f <f@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 git nodejs yarn tzdata libxslt-dev libxml2-dev
|
RUN apk add --no-cache ruby~${RUBY_VERSION}.${RUBY_PATCH} patch
|
||||||
RUN apk add --no-cache ruby-dev ruby-bundler ruby-json ruby-bigdecimal ruby-rake ruby-etc
|
|
||||||
RUN apk add --no-cache postgresql-dev sqlite-dev mariadb-dev
|
|
||||||
RUN apk add --no-cache linux-headers
|
|
||||||
|
|
||||||
# https://github.com/rubygems/rubygems/issues/2918
|
# Patch rubygems to install x86_64-linux-musl gems
|
||||||
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
|
|
||||||
COPY ./rubygems-platform-musl.patch /tmp/
|
COPY ./rubygems-platform-musl.patch /tmp/
|
||||||
RUN patch -d /usr/lib/ruby/2.7.0 -Np 0 -i /tmp/rubygems-platform-musl.patch
|
RUN cd /usr/lib/ruby/${RUBY_VERSION}.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch || true
|
||||||
|
|
||||||
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||||
|
ARG ALPINE_VERSION
|
||||||
|
MAINTAINER "f <f@sutty.nl>"
|
||||||
|
ARG RUBY_VERSION
|
||||||
|
ARG RUBY_PATCH
|
||||||
|
|
||||||
|
# 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/
|
||||||
|
|
||||||
|
RUN apk add --no-cache ruby-dev
|
||||||
|
|
||||||
ENTRYPOINT /bin/sh
|
ENTRYPOINT /bin/sh
|
||||||
|
|
Loading…
Reference in a new issue