Spotter-VM/lxc-apps/opendatakit/opendatakit-build.image

40 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

IMAGE opendatakit-build_0.3.5-210106
FROM alpine3.12-ruby2.4_2.4.10-210106
2018-09-13 13:50:40 +02:00
RUN EOF
# Install runtime dependencies
2020-03-21 22:42:35 +01:00
apk --no-cache add libpq nodejs openssl
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
2020-06-03 18:38:01 +02:00
git clone --depth 1 https://github.com/getodk/build /srv/opendatakit-build
2018-09-13 13:50:40 +02:00
# Install Ruby dependencies
cd /srv/opendatakit-build
gem install bundler:1.13.6
2018-09-13 13:50:40 +02:00
bundle install --without test
rake deploy:build
# Clone build2xlsform
2020-06-03 18:38:01 +02:00
git clone --depth 1 https://github.com/getodk/build2xlsform /srv/build2xlsform
2018-09-13 13:50:40 +02:00
cd /srv/build2xlsform
make
# Create OS user
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 {} +
2020-03-25 21:32:19 +01:00
rm -rf /.bundle /root/.config /root/.npm
2018-09-13 13:50:40 +02:00
EOF
2020-03-21 22:42:35 +01:00
COPY opendatakit-build.image.d
2018-09-13 13:50:40 +02:00
2020-02-09 15:54:46 +01:00
CMD /bin/s6-svscan /etc/services.d