2018-04-25 23:26:18 +08:00
|
|
|
FROM bbb-common-web AS builder
|
2018-01-29 22:32:43 +08:00
|
|
|
|
|
|
|
RUN mkdir -p /root/tools \
|
2018-04-25 23:26:18 +08:00
|
|
|
&& cd /root/tools \
|
2018-01-29 22:32:43 +08:00
|
|
|
&& wget http://services.gradle.org/distributions/gradle-2.12-bin.zip \
|
|
|
|
&& 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}"
|
|
|
|
|
2018-06-15 21:21:03 +08:00
|
|
|
ARG COMMON_VERSION=0.0.1-SNAPSHOT
|
2018-01-29 22:32:43 +08:00
|
|
|
|
2018-04-25 23:26:18 +08:00
|
|
|
COPY . /source
|
2018-01-29 22:32:43 +08:00
|
|
|
|
|
|
|
RUN cd /source \
|
|
|
|
&& find -name build.gradle -exec sed -i "s|\(.*org.bigbluebutton.*bbb-common-message[^:]*\):.*|\1:$COMMON_VERSION'|g" {} \; \
|
2018-04-25 23:26:18 +08:00
|
|
|
&& find -name build.gradle -exec sed -i "s|\(.*org.bigbluebutton.*bbb-common-web[^:]*\):.*|\1:$COMMON_VERSION'|g" {} \;
|
|
|
|
|
|
|
|
RUN cd /source \
|
2018-01-29 22:32:43 +08:00
|
|
|
&& gradle resolveDeps \
|
2018-04-25 23:26:18 +08:00
|
|
|
&& grails war
|
|
|
|
|
|
|
|
FROM tomcat:7-jre8
|
|
|
|
|
|
|
|
WORKDIR $CATALINA_HOME
|
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
ENV DOCKERIZE_VERSION v0.6.1
|
|
|
|
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
|
|
|
|
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
|
|
|
|
&& rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2018-04-25 23:26:18 +08:00
|
|
|
RUN apt-get update \
|
2018-07-26 02:14:55 +08:00
|
|
|
&& apt-get -y install imagemagick xpdf-utils netcat libreoffice ttf-liberation fonts-crosextra-carlito fonts-crosextra-caladea unzip procps \
|
|
|
|
&& wget http://ftp.us.debian.org/debian/pool/main/libj/libjpeg8/libjpeg8_8d-1+deb7u1_amd64.deb \
|
|
|
|
&& dpkg -i libjpeg8*.deb \
|
|
|
|
&& rm libjpeg8*.deb
|
2018-04-25 23:26:18 +08:00
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
RUN echo "deb http://ubuntu.bigbluebutton.org/xenial-200-dev bigbluebutton-xenial main " | tee /etc/apt/sources.list.d/bigbluebutton.list \
|
2018-04-25 23:26:18 +08:00
|
|
|
&& wget http://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- | apt-key add - \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get -y install bbb-swftools
|
2018-01-29 22:32:43 +08:00
|
|
|
|
2018-06-15 21:21:03 +08:00
|
|
|
# clean default webapps
|
|
|
|
RUN rm -r webapps/*
|
|
|
|
|
|
|
|
COPY --from=builder /source/target/bigbluebutton-0.9.0.war webapps/bigbluebutton.war
|
|
|
|
|
|
|
|
RUN unzip -q webapps/bigbluebutton.war -d webapps/bigbluebutton \
|
|
|
|
&& rm webapps/bigbluebutton.war
|
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
COPY turn-stun-servers.xml.tmpl turn-stun-servers.xml.tmpl
|
2018-06-15 21:21:03 +08:00
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
2018-01-29 22:32:43 +08:00
|
|
|
|
2018-07-26 02:14:55 +08:00
|
|
|
CMD [ "dockerize", \
|
|
|
|
"-template", "turn-stun-servers.xml.tmpl:webapps/bigbluebutton/WEB-INF/spring/turn-stun-servers.xml", \
|
|
|
|
"docker-entrypoint.sh" ]
|