Compare commits
2 commits
cf9abbd7bf
...
fd95af3266
Author | SHA1 | Date | |
---|---|---|---|
|
fd95af3266 | ||
|
ed4f2dbb8d |
2 changed files with 29 additions and 0 deletions
|
@ -3,6 +3,7 @@ ARG ALPINE_VERSION=3.13.6
|
|||
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
|
||||
MAINTAINER "f <f@sutty.nl>"
|
||||
|
||||
ENV PLATFORM=x86_64-linux-musl
|
||||
ENV GEM=none
|
||||
ENV VERSION=0
|
||||
ENV SUTTY=sutty.nl
|
||||
|
@ -18,6 +19,7 @@ RUN gem install --no-user-install --no-document --source https://rubygems.org ge
|
|||
|
||||
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
|
||||
|
||||
RUN install -dm 2750 -o builder -g builder /srv/gems
|
||||
VOLUME /srv/gems
|
||||
|
|
27
bulk-compiler.sh
Normal file
27
bulk-compiler.sh
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
test -n "${HTTP_BASIC_USER}"
|
||||
test -n "${HTTP_BASIC_PASSWORD}"
|
||||
test -n "${SUTTY}"
|
||||
test -n "${PLATFORM}"
|
||||
|
||||
find build/ -type f |
|
||||
sed -re "s|^build/([^/]+)/(.*)|&\tbuilt/${ALPINE_VERSION}/\1/\2\t\1\t\2|" |
|
||||
while read BUILD BUILT GEM_NAME GEM_VERSION; do
|
||||
test -f "${BUILT}" && continue
|
||||
|
||||
source "${BUILD}"
|
||||
|
||||
HTTP_BASIC_USER="${HTTP_BASIC_USER}" \
|
||||
HTTP_BASIC_PASSWORD="${HTTP_BASIC_PASSWORD}" \
|
||||
SUTTY="${SUTTY}" \
|
||||
PLATFORM="${PLATFORM}" \
|
||||
GEM_NAME="${GEM_NAME}" \
|
||||
GEM_VERSION="${GEM_VERSION}" \
|
||||
EXTRA_PKGS="${EXTRA_PKGS}" \
|
||||
/usr/local/bin/bootstrap
|
||||
|
||||
dirname "${BUILT}" | xargs mkdir -p
|
||||
touch "${BUILT}"
|
||||
done
|
Loading…
Reference in a new issue