-
Notifications
You must be signed in to change notification settings - Fork 146
/
Dockerfile.compile
21 lines (20 loc) · 1.12 KB
/
Dockerfile.compile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM ubuntu:jammy
LABEL maintainer="[email protected]"
RUN echo "mysql-server mysql-server/root_password password sa" | debconf-set-selections
RUN echo "mysql-server mysql-server/root_password_again password sa" | debconf-set-selections
RUN apt-get update && apt-get install -y \
openjdk-17-jdk \
mysql-server \
&& rm -rf /var/lib/apt/lists/*
ENV GRADLE_USER_HOME /workspace/.gradle
ENV GRADLE_OPTS -Xmx6g
RUN usermod -d /var/lib/mysql/ mysql && \
sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/mysql.conf.d/mysqld.cnf && \
sed -i "s/port\s*=\s*3306/port = 6603/" /etc/mysql/mysql.conf.d/mysqld.cnf && \
/etc/init.d/mysql start && \
mysql -u root --password=sa -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'sa' WITH GRANT OPTION;" && \
mysql -u root --password=sa -e "GRANT PROXY ON ''@'' TO 'root'@'%' WITH GRANT OPTION;" && \
/etc/init.d/mysql restart && \
mysql -u root --password=sa -e 'CREATE DATABASE `keel` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'
ADD build-scripts/entrypoint.sh /usr/bin/
ENTRYPOINT ["/usr/bin/entrypoint.sh"]