diff --git a/Dockerfile b/Dockerfile index ad30b0c..62e451e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,7 @@ ENV HTTP_BASIC_USER=sutty ENV HTTP_BASIC_PASSWORD=gibberish ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=1 -COPY ./gem-compiler.gem /tmp/ -RUN gem install --no-user-install --no-document /tmp/gem-compiler.gem -RUN gem install --no-user-install --no-document --source https://rubygems.org geminabox mini_portile2 +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 @@ -20,6 +18,7 @@ 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++ USER builder ENTRYPOINT /usr/local/bin/gemcompiler diff --git a/gem-compiler.gem b/gem-compiler.gem deleted file mode 100644 index 87185a1..0000000 Binary files a/gem-compiler.gem and /dev/null differ diff --git a/gemcompiler.sh b/gemcompiler.sh index 6c4d870..b90df82 100644 --- a/gemcompiler.sh +++ b/gemcompiler.sh @@ -6,11 +6,11 @@ PLATFORM=`ruby -e "puts RbConfig::CONFIG['arch']"` cd /srv/gems test -f ${GEM}-${VERSION}.gem \ - || gem fetch --source=https://rubygems.org --platform=ruby \ + || gem fetch --source=https://${SUTTY} --platform=ruby \ --version ${VERSION} ${GEM} test -f ${GEM}-${VERSION}-${PLATFORM}.gem \ - || gem compile -V --prune ${GEM}-${VERSION}.gem + || gem compile -V --prune --strip "strip --strip-unneeded" ${GEM}-${VERSION}.gem gem inabox -o ${GEM}-${VERSION}-${PLATFORM}.gem \ --host https://${HTTP_BASIC_USER}:${HTTP_BASIC_PASSWORD}@gems.${SUTTY}