This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch 4.13
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.13 by this push:
new 9abb703 Fix simulator docker db deploy issue (apache#3397) (#3651)
9abb703 is described below
commit 9abb703a41a48fc16bc8153451b3c403d4522454
Author: Khachatur Nazaretyan <[email protected]>
AuthorDate: Fri Mar 6 14:13:15 2020 +0100
Fix simulator docker db deploy issue (apache#3397) (#3651)
Signed-off-by: Khachatur Nazaretyan <[email protected]>
---
tools/docker/Dockerfile | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index 5c8b533..8a0e409 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -22,6 +22,8 @@ FROM ubuntu:16.04
MAINTAINER "Apache CloudStack" <[email protected]>
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"]