docker: upgrade to ubuntu 18.04 and fix two issues (#3955)

upgrade dockerfile to use ubuntu 18.04 instead of ubuntu 16.04 because we use java 11 in 4.14.
meanwhile, fix an issue due to mysql change in ubuntu 18.04, and fix NPE by installing iproute2.
This commit is contained in:
Wei Zhou 2020-06-12 07:00:22 +02:00 committed by GitHub
parent 6e47c49fbf
commit 9beec486af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@
#
# CloudStack-simulator build
FROM ubuntu:16.04
FROM ubuntu:18.04
MAINTAINER "Apache CloudStack" <dev@cloudstack.apache.org>
LABEL Vendor="Apache.org" License="ApacheV2" Version="4.15.0.0-SNAPSHOT"
@ -31,6 +31,7 @@ RUN apt-get -y update && apt-get install -y \
git \
sudo \
ipmitool \
iproute2 \
maven \
openjdk-11-jdk \
python-dev \
@ -55,6 +56,7 @@ RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
RUN find /var/lib/mysql -type f -exec touch {} \; && \
(/usr/bin/mysqld_safe &) && \
sleep 5; \
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by ''" --connect-expired-password; \
mvn -Pdeveloper -pl developer -Ddeploydb; \
mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
MARVIN_FILE=`find /root/tools/marvin/dist/ -name "Marvin*.tar.gz"`; \