2019-09-18 11:29:58 +02:00
|
|
|
IMAGE opendatakit-build_0.3.5-190620
|
2019-11-30 09:59:32 +01:00
|
|
|
FROM alpine3.9-ruby2.4_2.4.5-190620
|
2018-09-13 13:50:40 +02:00
|
|
|
|
|
|
|
RUN EOF
|
|
|
|
# Install runtime dependencies
|
2019-11-30 09:59:32 +01:00
|
|
|
apk --no-cache add libpq nodejs
|
2018-09-13 13:50:40 +02:00
|
|
|
|
|
|
|
# Install build dependencies
|
|
|
|
apk --no-cache add --virtual .deps build-base git linux-headers make npm openjdk8-jre-base postgresql-dev
|
|
|
|
|
|
|
|
# Clone ODK Build
|
|
|
|
git clone --depth 1 https://github.com/opendatakit/build /srv/opendatakit-build
|
|
|
|
|
|
|
|
# Install Ruby dependencies
|
|
|
|
cd /srv/opendatakit-build
|
2019-12-21 14:26:47 +01:00
|
|
|
gem install bundler:1.13.6
|
2018-09-13 13:50:40 +02:00
|
|
|
bundle install --without test
|
|
|
|
rake deploy:build
|
|
|
|
|
|
|
|
# Clone build2xlsform
|
|
|
|
git clone --depth 1 https://github.com/opendatakit/build2xlsform /srv/build2xlsform
|
|
|
|
cd /srv/build2xlsform
|
|
|
|
make
|
|
|
|
|
|
|
|
# Create OS user
|
2019-10-14 07:59:06 +02:00
|
|
|
addgroup -S -g 8080 odkbuild
|
|
|
|
adduser -S -u 8080 -h /srv/opendatakit-build -s /bin/false -g odkbuild -G odkbuild odkbuild
|
2018-09-13 13:50:40 +02:00
|
|
|
chown -R odkbuild:odkbuild /srv/opendatakit-build
|
|
|
|
chown -R odkbuild:odkbuild /srv/build2xlsform
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
apk --no-cache del .deps
|
|
|
|
find /srv -name '.git*' -exec rm -rf {} +
|
|
|
|
rm -rf /root/.bundle /root/.config /root/.npm
|
|
|
|
EOF
|
|
|
|
|
2019-10-05 23:53:32 +02:00
|
|
|
COPY opendatakit-build.lxc
|
2018-09-13 13:50:40 +02:00
|
|
|
|
2018-09-13 16:21:16 +02:00
|
|
|
CMD s6-svscan /etc/services.d
|