Introduce build2xlsform into ODK Build container, closes #227
This commit is contained in:
parent
f436a00223
commit
52557f54aa
@ -2,11 +2,19 @@ FROM ruby
|
|||||||
MAINTAINER Disassembler <disassembler@dasm.cz>
|
MAINTAINER Disassembler <disassembler@dasm.cz>
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
# Install runtime dependencies
|
# Install NodeJS runtime
|
||||||
apk --no-cache add libpq
|
apk --no-cache add nodejs paxctl \
|
||||||
|
# Fix grsec attributes to loosen memory protection restrictions
|
||||||
|
&& paxctl -cm /usr/bin/node \
|
||||||
|
# Cleanup
|
||||||
|
&& apk --no-cache del paxctl
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
# Install build dependencies
|
# Install runtime dependencies
|
||||||
|
apk --no-cache add libpq s6
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
# Install build dependencies for ODK Build
|
||||||
apk --no-cache add --virtual .deps build-base git linux-headers openjdk8-jre-base paxctl postgresql-dev \
|
apk --no-cache add --virtual .deps build-base git linux-headers openjdk8-jre-base paxctl postgresql-dev \
|
||||||
# Fix grsec attributes to loosen memory protection restrictions
|
# Fix grsec attributes to loosen memory protection restrictions
|
||||||
&& paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \
|
&& paxctl -cm /usr/lib/jvm/java-1.8-openjdk/jre/bin/java \
|
||||||
@ -26,8 +34,22 @@ RUN \
|
|||||||
&& find /srv/odkbuild -name '.git*' -exec rm -rf {} + \
|
&& find /srv/odkbuild -name '.git*' -exec rm -rf {} + \
|
||||||
&& rm -rf /root/.bundle
|
&& rm -rf /root/.bundle
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
# Install build dependencies for build2xlsform
|
||||||
|
apk --no-cache add --virtual .deps git make \
|
||||||
|
# Clone build2xlsform
|
||||||
|
&& git clone --depth 1 https://github.com/opendatakit/build2xlsform /srv/build2xlsform \
|
||||||
|
&& cd /srv/build2xlsform \
|
||||||
|
&& make \
|
||||||
|
# Change ownership
|
||||||
|
&& chown -R odkbuild:odkbuild /srv/build2xlsform \
|
||||||
|
# Cleanup
|
||||||
|
&& apk --no-cache del .deps \
|
||||||
|
&& find /srv/build2xlsform -name '.git*' -exec rm -rf {} + \
|
||||||
|
&& rm -rf /root/.config /root/.npm
|
||||||
|
|
||||||
|
COPY docker/ /
|
||||||
|
|
||||||
EXPOSE 8017
|
EXPOSE 8017
|
||||||
|
|
||||||
USER odkbuild
|
CMD ["s6-svscan", "/etc/services.d"]
|
||||||
WORKDIR /srv/odkbuild
|
|
||||||
CMD ["bundle", "exec", "rackup", "config.ru", "-o", "0.0.0.0", "-p", "8017"]
|
|
||||||
|
3
opendatakit-build/docker/etc/services.d/.s6-svscan/finish
Executable file
3
opendatakit-build/docker/etc/services.d/.s6-svscan/finish
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
/bin/true
|
6
opendatakit-build/docker/etc/services.d/build2xlsform/run
Executable file
6
opendatakit-build/docker/etc/services.d/build2xlsform/run
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/execlineb -P
|
||||||
|
|
||||||
|
cd /srv/build2xlsform
|
||||||
|
fdmove -c 2 1
|
||||||
|
s6-setuidgid 8017:8017
|
||||||
|
node lib/server.js
|
6
opendatakit-build/docker/etc/services.d/odkbuild/run
Executable file
6
opendatakit-build/docker/etc/services.d/odkbuild/run
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/execlineb -P
|
||||||
|
|
||||||
|
cd /srv/odkbuild
|
||||||
|
fdmove -c 2 1
|
||||||
|
s6-setuidgid 8017:8017
|
||||||
|
bundle exec rackup config.ru -o 0.0.0.0 -p 8017
|
Loading…
Reference in New Issue
Block a user