1- from ubuntu:22.04
1+ # Licensed to the Apache Software Foundation (ASF) under one
2+ # or more contributor license agreements. See the NOTICE file
3+ # distributed with this work for additional information
4+ # regarding copyright ownership. The ASF licenses this file
5+ # to you under the Apache License, Version 2.0 (the
6+ # "License"); you may not use this file except in compliance
7+ # with the License. You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing,
12+ # software distributed under the License is distributed on an
13+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ # KIND, either express or implied. See the License for the
15+ # specific language governing permissions and limitations
16+ # under the License.
17+ #
18+ # CloudStack-simulator build
19+
20+ FROM ubuntu:22.04
21+
22+ LABEL Vendor="Apache.org" License="ApacheV2" Version="4.23.0.0-SNAPSHOT" Author="Apache CloudStack <dev@cloudstack.apache.org>"
23+
24+ ARG DEBIAN_FRONTEND=noninteractive
25+
26+ RUN apt-get -y update && apt-get install -y \
27+ genisoimage \
28+ libffi-dev \
29+ libssl-dev \
30+ curl \
31+ gcc-10 \
32+ git \
33+ sudo \
34+ ipmitool \
35+ iproute2 \
36+ maven \
37+ openjdk-11-jdk \
38+ python3-dev \
39+ python-is-python3 \
40+ python3-setuptools \
41+ python3-pip \
42+ python3-mysql.connector \
43+ python3-bcrypt \
44+ python3-cryptography \
45+ python3-cffi \
46+ supervisor
47+
48+ RUN apt-get install -qqy mysql-server && \
49+ apt-get clean all && \
50+ mkdir -p /var/run/mysqld; \
51+ chown mysql /var/run/mysqld
52+
53+ RUN echo '''sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"''' >> /etc/mysql/mysql.conf.d/mysqld.cnf
54+
55+ COPY tools/docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
56+ COPY . ./root
57+ WORKDIR /root
58+
59+ RUN mvn -Pdeveloper -Dsimulator -DskipTests clean install
60+
61+ RUN find /var/lib/mysql -type f -exec touch {} \; && \
62+ (/usr/bin/mysqld_safe &) && \
63+ sleep 5; \
64+ mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by ''" --connect-expired-password; \
65+ mvn -Pdeveloper -pl developer -Ddeploydb; \
66+ mvn -Pdeveloper -pl developer -Ddeploydb-simulator; \
67+ MARVIN_FILE=`find /root/tools/marvin/dist/ -name "Marvin*.tar.gz"`; \
68+ rm -rf /usr/bin/s390x-linux-gnu-gcc && \
69+ ln -s /usr/bin/gcc-10 /usr/bin/s390x-linux-gnu-gcc; \
70+ pip3 install $MARVIN_FILE
71+
72+ RUN apt-get install -y nodejs npm build-essential python3 g++ make && \
73+ bash
74+
75+ RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash && \
76+ . /root/.nvm/nvm.sh && \
77+ nvm install 10 && \
78+ nvm use 10 && \
79+ NVM_BIN="$(dirname "$(nvm which node)")" && \
80+ ln -sf "$NVM_BIN/node" /usr/local/bin/node && \
81+ ln -sf "$NVM_BIN/npm" /usr/local/bin/npm && \
82+ cd ui && npm install && npm rebuild node-sass
83+
84+
85+ VOLUME /var/lib/mysql
86+
87+ EXPOSE 8080 8096 5050
88+
89+ CMD ["/usr/bin/supervisord"]
0 commit comments