Spotter-VM/opendatakit-build/lxcfile

44 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-09-13 13:50:40 +02:00
IMAGE opendatakit-build
LAYER shared/alpine
LAYER shared/ruby
LAYER shared/nodejs
LAYER opendatakit-build/opendatakit-build
FIXLAYER /usr/bin/fix-apk
RUN EOF
# Install runtime dependencies
apk --no-cache add libpq
# 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
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
addgroup -S -g 8017 odkbuild
adduser -S -u 8017 -h /srv/opendatakit-build -s /bin/false -g odkbuild -G odkbuild odkbuild
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
COPY lxc
CMD /bin/s6-svscan /etc/services.d