34 lines
1.1 KiB
Docker
34 lines
1.1 KiB
Docker
ARG RUBY_VERSION=2.7
|
|
ARG RUBY_PATCH=6
|
|
ARG ALPINE_VERSION=3.13.6
|
|
ARG BASE_IMAGE=gitea.nulo.in/sutty/sdk-ruby
|
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
|
|
LABEL org.opencontainers.image.authors="f@sutty.nl"
|
|
|
|
ENV PLATFORM=x86_64-linux-musl
|
|
ENV GEM_NAME=none
|
|
ENV GEM_VERSION=0
|
|
ENV SUTTY=sutty.nl
|
|
ENV HTTP_BASIC_USER=sutty
|
|
ENV HTTP_BASIC_PASSWORD=gibberish
|
|
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1
|
|
ENV EXTRA_PKGS=''
|
|
|
|
COPY ./gem-compiler-0.10.0.gem /tmp/
|
|
RUN gem install --no-user-install --no-document --source https://rubygems.org geminabox
|
|
RUN gem install --no-user-install --no-document --source https://rubygems.org /tmp/gem-compiler-0.10.0.gem
|
|
|
|
COPY ./gem-compiler.sh /usr/local/bin/gem-compiler
|
|
COPY ./bootstrap.sh /usr/local/bin/bootstrap
|
|
COPY ./bulk-compiler.sh /usr/local/bin/bulk-compiler
|
|
COPY ./os-version.sh /usr/local/bin/os-version
|
|
|
|
RUN install -dm 2750 -o builder -g builder /srv/gems
|
|
VOLUME /srv/gems
|
|
|
|
RUN apk add --no-cache su-exec libc6-compat libstdc++ openssh-client
|
|
RUN apk add --no-cache tea \
|
|
|| wget https://gitea.com/attachments/395b73a9-a56b-4933-8c99-dc2d2619925a -O /usr/bin/tea \
|
|
&& chmod +x /usr/bin/tea
|
|
|
|
ENTRYPOINT /bin/sh
|