1- FROM ubuntu:xenial-20181113
1+ FROM quay.io/bedrock/ ubuntu:22.04
22
3- MAINTAINER "René Moser" <mail@renemoser.net>
3+ ENV DEBIAN_FRONTEND noninteractive
44
5- ARG src_url=https://github.com/apache/cloudstack/archive/4.13.1 .0.tar.gz
5+ ARG src_url=https://github.com/apache/cloudstack/archive/refs/tags/4.17.2 .0.tar.gz
66
77RUN echo 'mysql-server mysql-server/root_password password root' | debconf-set-selections; \
88 echo 'mysql-server mysql-server/root_password_again password root' | debconf-set-selections;
99
10- RUN apt-get -y update && apt-get dist-upgrade -y && apt-get install -y \
10+ RUN apt-get -y update && apt-get install -y --no- install-recommends \
1111 genisoimage \
1212 libffi-dev \
1313 libssl-dev \
1414 sudo \
1515 ipmitool \
1616 maven \
1717 netcat \
18- openjdk-8-jdk \
19- python-dev \
20- python-mysql.connector \
21- python-pip \
22- python-setuptools \
23- python-paramiko \
18+ openjdk-11-jdk \
19+ python3 \
20+ python3-dev \
21+ python3-mysql.connector \
22+ python3-pip \
23+ python3-setuptools \
24+ python3-paramiko \
2425 supervisor \
2526 wget \
2627 nginx \
2728 jq \
2829 mysql-server \
2930 openssh-client \
30- && apt-get clean all \
31- && rm -rf /var/lib/apt/lists/*;
31+ build-essential \
32+ npm \
33+ nodejs \
34+ && apt-get clean all && rm -rf /var/lib/apt/lists/*;
35+
3236
3337# TODO: check if and why this is needed
3438RUN mkdir -p /root/.ssh \
3539 && chmod 0700 /root/.ssh \
3640 && ssh-keygen -t rsa -N "" -f id_rsa.cloud
3741
3842RUN mkdir -p /var/run/mysqld; \
39- chown mysql /var/run/mysqld; \
40- 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
43+ chown mysql /var/run/mysqld;
4144
4245RUN (/usr/bin/mysqld_safe &); sleep 5; mysqladmin -u root -proot password ''
4346
@@ -47,24 +50,30 @@ RUN wget $src_url -O /opt/cloudstack.tar.gz; \
4750
4851WORKDIR /opt/cloudstack
4952
53+ RUN ln -s /usr/bin/python3 /usr/local/bin/python
5054RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
5155RUN mvn -Pdeveloper -Dsimulator dependency:go-offline
5256RUN mvn -pl client jetty:run -Dsimulator -Djetty.skip -Dorg.eclipse.jetty.annotations.maxWait=120
5357
58+ COPY zones.cfg /opt/zones.cfg
59+
5460RUN (/usr/bin/mysqld_safe &); \
5561 sleep 5; \
5662 mvn -Pdeveloper -pl developer -Ddeploydb; \
5763 mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
64+ mvn -Pdeveloper,marvin -pl :cloud-marvin; \
5865 MARVIN_FILE=$(find /opt/cloudstack/tools/marvin/dist/ -name "Marvin*.tar.gz" ); \
66+ pip install wheel; \
5967 pip install $MARVIN_FILE;
6068
61- COPY zones.cfg /opt/zones.cfg
6269COPY nginx_default.conf /etc/nginx/sites-available/default
63- RUN pip install cs==2.5
70+ RUN pip install cs
6471COPY run.sh /opt/run.sh
6572COPY deploy.sh /opt/deploy.sh
6673COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
6774
75+ RUN cd ui && npm install && npm run build
76+
6877RUN /opt/deploy.sh
6978
7079EXPOSE 8888 8080 8096
0 commit comments