LXCize ODK build
This commit is contained in:
parent
89b11a6112
commit
05bf6da6ce
@ -1,28 +0,0 @@
|
||||
FROM tomcat
|
||||
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
|
||||
|
||||
RUN \
|
||||
# Install build dependencies
|
||||
apk --no-cache add --virtual .deps git git-lfs openjdk8 \
|
||||
# Clone ODK aggregate
|
||||
&& git clone --depth 1 https://github.com/opendatakit/aggregate.git /srv/opendatakit \
|
||||
# Compile Java web archive
|
||||
&& cd /srv/opendatakit \
|
||||
&& cp gradle.properties.example gradle.properties \
|
||||
&& ./gradlew war \
|
||||
# Deploy web archive
|
||||
&& mkdir /srv/tomcat/webapps/ROOT \
|
||||
&& unzip build/libs/aggregate-*.war -d /srv/tomcat/webapps/ROOT \
|
||||
# Create OS user
|
||||
&& addgroup -S -g 8015 odk \
|
||||
&& adduser -S -u 8015 -h /srv/tomcat -s /bin/false -g odk -G odk odk \
|
||||
&& chown -R odk:odk /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work \
|
||||
# Cleanup
|
||||
&& apk --no-cache del .deps \
|
||||
&& rm -rf /root/.gradle /root/.java /srv/opendatakit
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
USER odk
|
||||
WORKDIR /srv/tomcat
|
||||
CMD ["catalina.sh", "run"]
|
35
opendatakit/lxcfile
Normal file
35
opendatakit/lxcfile
Normal file
@ -0,0 +1,35 @@
|
||||
IMAGE opendatakit
|
||||
LAYER shared/alpine
|
||||
LAYER shared/java
|
||||
LAYER shared/tomcat
|
||||
LAYER opendatakit/opendatakit
|
||||
|
||||
RUN EOF
|
||||
# Install build dependencies
|
||||
apk --no-cache add --virtual .deps git git-lfs openjdk8
|
||||
|
||||
# Clone ODK aggregate
|
||||
git clone --depth 1 https://github.com/opendatakit/aggregate.git /srv/opendatakit
|
||||
|
||||
# Compile Java web archive
|
||||
cd /srv/opendatakit
|
||||
cp gradle.properties.example gradle.properties
|
||||
./gradlew war
|
||||
|
||||
# Deploy web archive
|
||||
mkdir /srv/tomcat/webapps/ROOT
|
||||
unzip build/libs/aggregate-*.war -d /srv/tomcat/webapps/ROOT
|
||||
|
||||
# Create OS user
|
||||
addgroup -S -g 8015 odk
|
||||
adduser -S -u 8015 -h /srv/tomcat -s /bin/false -g odk -G odk odk
|
||||
chown -R odk:odk /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work
|
||||
|
||||
# Cleanup
|
||||
apk --no-cache del .deps
|
||||
rm -rf /root/.gradle /root/.java /srv/opendatakit
|
||||
EOF
|
||||
|
||||
USER 8015 8015
|
||||
WORKDIR /srv/tomcat
|
||||
CMD /usr/bin/catalina.sh run
|
Loading…
Reference in New Issue
Block a user