From 27447f7a7d0d064c8b6ee45f0927418e87cf6a57 Mon Sep 17 00:00:00 2001 From: Ankit Tiwari Date: Fri, 5 Jan 2024 11:24:25 +0530 Subject: [PATCH] Add Dockerfile for ubuntu 22.04 --- .circleci/Dockerfile-ubuntu22 | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .circleci/Dockerfile-ubuntu22 diff --git a/.circleci/Dockerfile-ubuntu22 b/.circleci/Dockerfile-ubuntu22 new file mode 100644 index 000000000..1f60f940d --- /dev/null +++ b/.circleci/Dockerfile-ubuntu22 @@ -0,0 +1,57 @@ +FROM ubuntu:22.04 + +RUN apt-get update && apt-get upgrade -y + +RUN apt-get install build-essential -y + +RUN echo "mysql-server mysql-server/root_password password root" | debconf-set-selections + +RUN echo "mysql-server mysql-server/root_password_again password root" | debconf-set-selections + +RUN apt install mysql-server -y + +RUN usermod -d /var/lib/mysql/ mysql + +RUN [ -d /var/run/mysqld ] || mkdir -p /var/run/mysqld + +ADD ./runMySQL.sh /runMySQL.sh + +RUN chmod +x /runMySQL.sh + +RUN apt-get install -y git-core + +RUN apt-get install -y wget + +# Install OpenJDK 12 +RUN wget https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz + +RUN mkdir /usr/java + +RUN mv openjdk-12.0.2_linux-x64_bin.tar.gz /usr/java + +RUN cd /usr/java && tar -xzvf openjdk-12.0.2_linux-x64_bin.tar.gz + +RUN echo 'JAVA_HOME=/usr/java/jdk-12.0.2' >> /etc/profile +RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile + +RUN apt-get install jq -y + +RUN apt-get install curl -y + +RUN apt-get install unzip -y + +# Install OpenJDK 15.0.1 +RUN wget https://download.java.net/java/GA/jdk15.0.1/51f4f36ad4ef43e39d0dfdbaf6549e32/9/GPL/openjdk-15.0.1_linux-x64_bin.tar.gz + +RUN mv openjdk-15.0.1_linux-x64_bin.tar.gz /usr/java + +RUN cd /usr/java && tar -xzvf openjdk-15.0.1_linux-x64_bin.tar.gz + +RUN echo 'JAVA_HOME=/usr/java/jdk-15.0.1' >> /etc/profile +RUN echo 'PATH=$PATH:$HOME/bin:$JAVA_HOME/bin' >> /etc/profile +RUN echo 'export JAVA_HOME' >> /etc/profile +RUN echo 'export JRE_HOME' >> /etc/profile +RUN echo 'export PATH' >> /etc/profile + +RUN update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-12.0.2/bin/java" 1 +RUN update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-12.0.2/bin/javac" 1 \ No newline at end of file