gem compiler
This commit is contained in:
parent
a2e27c5316
commit
e7fe5ab5b8
3 changed files with 33 additions and 1 deletions
21
Dockerfile
21
Dockerfile
|
@ -1,2 +1,21 @@
|
|||
FROM sutty/monit:latest
|
||||
FROM sutty/sdk-ruby:latest
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
ENV GEM=none
|
||||
ENV VERSION=0
|
||||
ENV SUTTY=sutty.nl
|
||||
ENV HTTP_BASIC_USER=sutty
|
||||
ENV HTTP_BASIC_PASSWORD=gibberish
|
||||
|
||||
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
|
||||
|
||||
COPY ./gemcompiler.sh /usr/local/bin/gemcompiler
|
||||
RUN chmod 755 /usr/local/bin/gemcompiler
|
||||
|
||||
RUN install -dm 2750 -o builder -g builder /srv/gems
|
||||
VOLUME /srv/gems
|
||||
|
||||
USER builder
|
||||
ENTRYPOINT /usr/local/bin/gemcompiler
|
||||
|
|
BIN
gem-compiler.gem
Normal file
BIN
gem-compiler.gem
Normal file
Binary file not shown.
13
gemcompiler.sh
Normal file
13
gemcompiler.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd /srv/gems
|
||||
|
||||
test -f ${GEM}-${VERSION}.gem \
|
||||
|| gem fetch --source=https://rubygems.org --platform=ruby \
|
||||
--version ${VERSION} ${GEM}
|
||||
|
||||
test -f ${GEM}-${VERSION}-`uname -m`-linux.gem \
|
||||
|| gem compile -V --prune ${GEM}-${VERSION}.gem
|
||||
|
||||
gem inabox ${GEM}-${VERSION}-`uname -m`-linux.gem \
|
||||
--host https://${HTTP_BASIC_USER}:${HTTP_BASIC_PASSWORD}@gems.${SUTTY}
|
Loading…
Reference in a new issue