Skip to content

Commit 9abb703

Browse files
authored
Fix simulator docker db deploy issue (#3397) (#3651)
Signed-off-by: Khachatur Nazaretyan <nkhachatur@gmail.com>
1 parent 0fab5e8 commit 9abb703

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

tools/docker/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ FROM ubuntu:16.04
2222
MAINTAINER "Apache CloudStack" <dev@cloudstack.apache.org>
2323
LABEL Vendor="Apache.org" License="ApacheV2" Version="4.13.1.0-SNAPSHOT"
2424

25+
ARG DEBIAN_FRONTEND=noninteractive
26+
2527
RUN apt-get -y update && apt-get install -y \
2628
genisoimage \
2729
libffi-dev \
@@ -37,32 +39,29 @@ RUN apt-get -y update && apt-get install -y \
3739
python-mysql.connector \
3840
supervisor
3941

40-
RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \
41-
echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections;
42-
4342
RUN apt-get install -qqy mysql-server && \
4443
apt-get clean all && \
4544
mkdir /var/run/mysqld; \
4645
chown mysql /var/run/mysqld
4746

4847
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
49-
RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password ''
50-
51-
#RUN pip install --allow-external mysql-connector-python mysql-connector-python
5248

5349
COPY tools/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
5450
COPY . ./root
5551
WORKDIR /root
5652

5753
RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
5854

59-
RUN (/usr/bin/mysqld_safe &); \
55+
RUN find /var/lib/mysql -type f -exec touch {} \; && \
56+
(/usr/bin/mysqld_safe &) && \
6057
sleep 5; \
6158
mvn -Pdeveloper -pl developer -Ddeploydb; \
6259
mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
6360
MARVIN_FILE=`find /root/tools/marvin/dist/ -name "Marvin*.tar.gz"`; \
6461
pip install $MARVIN_FILE
6562

63+
VOLUME /var/lib/mysql
64+
6665
EXPOSE 8080 8096
6766

6867
CMD ["/usr/bin/supervisord"]

0 commit comments

Comments
 (0)