Skip to content

Commit

Permalink
Add Dockerfile for ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
anku255 committed Jan 5, 2024
1 parent b8b2ad7 commit 27447f7
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .circleci/Dockerfile-ubuntu22
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 27447f7

Please sign in to comment.