From 8d1fa48e7a6f3c6201998788313f54c9ed4437a5 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 29 Sep 2021 15:54:59 -0300 Subject: [PATCH] install extra dependencies --- Dockerfile | 10 ++++------ bootstrap.sh | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100755 bootstrap.sh diff --git a/Dockerfile b/Dockerfile index 7e029f8..b94b998 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,18 +9,16 @@ ENV SUTTY=sutty.nl ENV HTTP_BASIC_USER=sutty ENV HTTP_BASIC_PASSWORD=gibberish ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1 +ENV EXTRA_PKGS='' RUN gem install --no-user-install --no-document --source https://rubygems.org geminabox mini_portile2 gem-compiler COPY ./gemcompiler.sh /usr/local/bin/gemcompiler -RUN chmod 755 /usr/local/bin/gemcompiler +COPY ./bootstrap.sh /usr/local/bin/bootstrap RUN install -dm 2750 -o builder -g builder /srv/gems VOLUME /srv/gems -RUN apk add --no-cache file-dev -RUN apk add --no-cache libssh2-dev -RUN apk add --no-cache libc6-compat libstdc++ +RUN apk add --no-cache su-exec file-dev libssh2-dev libc6-compat libstdc++ -USER builder -ENTRYPOINT /usr/local/bin/gemcompiler +ENTRYPOINT /usr/local/bin/bootstrap diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..a3b9014 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +set -x + +test -n "${EXTRA_PKGS}" && apk add --no-cache ${EXTRA_PKGS} + +su-exec builder /usr/local/bin/gemcompiler