2018-06-15 21:21:03 +08:00
|
|
|
FROM java:8-jdk AS builder
|
|
|
|
|
|
|
|
RUN mkdir -p /root/tools \
|
|
|
|
&& cd /root/tools \
|
2020-01-16 20:45:51 +08:00
|
|
|
&& wget https://services.gradle.org/distributions/gradle-2.12-bin.zip \
|
2018-06-15 21:21:03 +08:00
|
|
|
&& unzip gradle-2.12-bin.zip \
|
|
|
|
&& ln -s gradle-2.12 gradle
|
|
|
|
|
|
|
|
RUN mkdir -p /root/tools \
|
|
|
|
&& cd /root/tools \
|
|
|
|
&& wget https://github.com/grails/grails-core/releases/download/v2.5.2/grails-2.5.2.zip \
|
|
|
|
&& unzip grails-2.5.2.zip \
|
|
|
|
&& ln -s grails-2.5.2 grails
|
|
|
|
|
|
|
|
ENV PATH="/root/tools/gradle/bin:/root/tools/grails/bin:${PATH}"
|
|
|
|
|
|
|
|
COPY . /source
|
|
|
|
|
|
|
|
# build with:
|
|
|
|
# docker build -t mconftec/bbb-lti --build-arg title=Mconf --build-arg description='Single Sign On into Mconf' --build-arg vendor_code=mconf --build-arg vendor_name=Mconf --build-arg vendor_description='Mconf web conferencing' --build-arg vendor_url=https://mconf.com .
|
|
|
|
|
|
|
|
ARG title=BigBlueButton
|
|
|
|
ARG description='Single Sign On into BigBlueButton'
|
|
|
|
ARG vendor_code=bigbluebutton
|
|
|
|
ARG vendor_name=BigBlueButton
|
|
|
|
ARG vendor_description='Open source web conferencing system for distance learning.'
|
|
|
|
ARG vendor_url=http://www.bigbluebutton.org/
|
|
|
|
|
|
|
|
RUN cd /source \
|
|
|
|
&& sed -i "s|\(<blti:title>\)[^<]*|\1$title|g" grails-app/controllers/org/bigbluebutton/ToolController.groovy \
|
|
|
|
&& sed -i "s|\(<blti:description>\)[^<]*|\1$description|g" grails-app/controllers/org/bigbluebutton/ToolController.groovy \
|
|
|
|
&& sed -i "s|\(<lticp:code>\)[^<]*|\1$vendor_code|g" grails-app/controllers/org/bigbluebutton/ToolController.groovy \
|
|
|
|
&& sed -i "s|\(<lticp:name>\)[^<]*|\1$vendor_name|g" grails-app/controllers/org/bigbluebutton/ToolController.groovy \
|
|
|
|
&& sed -i "s|\(<lticp:description>\)[^<]*|\1$vendor_description|g" grails-app/controllers/org/bigbluebutton/ToolController.groovy \
|
|
|
|
&& sed -i "s|\(<lticp:url>\)[^<]*|\1$vendor_url|g" grails-app/controllers/org/bigbluebutton/ToolController.groovy \
|
2019-02-05 01:49:30 +08:00
|
|
|
&& sed -i "s|BigBlueButton|$title|g" grails-app/i18n/*.properties \
|
2018-06-15 21:21:03 +08:00
|
|
|
&& grails war
|
|
|
|
|
|
|
|
FROM tomcat:7-jre8
|
|
|
|
|
|
|
|
WORKDIR $CATALINA_HOME
|
|
|
|
|
|
|
|
# clean default webapps
|
|
|
|
RUN rm -r webapps/*
|
|
|
|
|
|
|
|
COPY --from=builder /source/target/lti-*.war webapps/lti.war
|
|
|
|
|
2018-07-26 09:05:51 +08:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
2018-06-15 21:21:03 +08:00
|
|
|
|
2019-02-05 01:49:30 +08:00
|
|
|
ENV LTI_CONTEXT_PATH lti
|
|
|
|
|
2018-07-26 09:05:51 +08:00
|
|
|
CMD ["docker-entrypoint.sh"]
|