Compare commits

..

No commits in common. "antifascista" and "63fcab0d4bb85b36a726c6befa4b1a745e5e2090" have entirely different histories.

2 changed files with 34 additions and 54 deletions

View file

@ -1,34 +1,22 @@
steps: pipeline:
publish: publish:
image: "docker.io/woodpeckerci/plugin-docker-buildx" image: plugins/docker
settings: registry: registry.nulo.in
registry: "https://gitea.nulo.in" repo: registry.nulo.in/sutty/containers-sdk-ruby
username: "sutty"
repo: "gitea.nulo.in/sutty/sdk-ruby"
tags: tags:
- "${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}" - ${ALPINE_VERSION}
- "latest" - latest
build_args: build_args:
- "RUBY_VERSION=${RUBY_VERSION}" - ALPINE_VERSION=${ALPINE_VERSION}
- "RUBY_PATCH=${RUBY_PATCH}" - BASE_IMAGE=registry.nulo.in/sutty/containers-sdk
- "ALPINE_VERSION=${ALPINE_VERSION}" username: sutty
- "BASE_IMAGE=gitea.nulo.in/sutty/sdk" secrets:
password: - docker_password
from_secret: "DOCKER_PASSWORD"
when: when:
branch: "antifascista" branch: antifascista
event: "push" event: push
matrix: matrix:
include: ALPINE_VERSION:
- ALPINE_VERSION: "3.20.3" - 3.13.6
RUBY_VERSION: "3.3" - 3.14.2
RUBY_PATCH: "3"
- ALPINE_VERSION: "3.19.4"
RUBY_VERSION: "3.2"
RUBY_PATCH: "4"
- ALPINE_VERSION: "3.18.9"
RUBY_VERSION: "3.2"
RUBY_PATCH: "4"
- ALPINE_VERSION: "3.17.10"
RUBY_VERSION: "3.1"
RUBY_PATCH: "5"

View file

@ -1,28 +1,20 @@
ARG BASE_IMAGE=sutty/sdk-ruby
ARG ALPINE_VERSION=3.13.6 ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=gitea.nulo.in/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
FROM ${BASE_IMAGE}:${ALPINE_VERSION} FROM ${BASE_IMAGE}:${ALPINE_VERSION}
ARG ALPINE_VERSION MAINTAINER "f <f@sutty.nl>"
LABEL org.opencontainers.image.authors="f@sutty.nl"
ARG RUBY_VERSION
ARG RUBY_PATCH
# Install ruby and extracted gems and copy patched rubygems RUN apk add --no-cache git nodejs nodejs-npm yarn tzdata libxslt-dev libxml2-dev
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-dev ruby-bundler ruby-json ruby-bigdecimal ruby-rake ruby-etc
RUN apk add --no-cache ruby-json ruby-bigdecimal ruby-rake ruby-bundler ruby-irb ruby-io-console ruby-etc RUN apk add --no-cache postgresql-dev sqlite-dev mariadb-dev
COPY --from=build /usr/lib/ruby/${RUBY_VERSION}.0/rubygems.rb /usr/lib/ruby/${RUBY_VERSION}.0/ RUN apk add --no-cache linux-headers
RUN apk add --no-cache ruby-dev RUN addgroup -g 82 -S www-data
RUN adduser -s /bin/sh -G www-data -h /home/app -D app
RUN install -dm 2750 -o app -g www-data /home/app/sutty
# https://github.com/rubygems/rubygems/issues/2918
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808
COPY ./rubygems-platform-musl.patch /tmp/
RUN patch -d /usr/lib/ruby/2.7.0 -Np 0 -i /tmp/rubygems-platform-musl.patch
ENTRYPOINT /bin/sh ENTRYPOINT /bin/sh