Fix simulator docker db deploy issue (apache#3397) (#3651)

Signed-off-by: Khachatur Nazaretyan <nkhachatur@gmail.com>
This commit is contained in:
Khachatur Nazaretyan 2020-03-06 14:13:15 +01:00 committed by GitHub
parent 0fab5e8d60
commit 9abb703a41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -22,6 +22,8 @@ FROM ubuntu:16.04
MAINTAINER "Apache CloudStack" <dev@cloudstack.apache.org>
LABEL Vendor="Apache.org" License="ApacheV2" Version="4.13.1.0-SNAPSHOT"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt-get install -y \
genisoimage \
libffi-dev \
@ -37,18 +39,12 @@ RUN apt-get -y update && apt-get install -y \
python-mysql.connector \
supervisor
RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \
echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections;
RUN apt-get install -qqy mysql-server && \
apt-get clean all && \
mkdir /var/run/mysqld; \
chown mysql /var/run/mysqld
RUN echo '''sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"''' >> /etc/mysql/mysql.conf.d/mysqld.cnf
RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password ''
#RUN pip install --allow-external mysql-connector-python mysql-connector-python
COPY tools/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY . ./root
@ -56,13 +52,16 @@ WORKDIR /root
RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
RUN (/usr/bin/mysqld_safe &); \
RUN find /var/lib/mysql -type f -exec touch {} \; && \
(/usr/bin/mysqld_safe &) && \
sleep 5; \
mvn -Pdeveloper -pl developer -Ddeploydb; \
mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
MARVIN_FILE=`find /root/tools/marvin/dist/ -name "Marvin*.tar.gz"`; \
pip install $MARVIN_FILE
VOLUME /var/lib/mysql
EXPOSE 8080 8096
CMD ["/usr/bin/supervisord"]