Skip to content

Instantly share code, notes, and snippets.

@Terkea
Created November 22, 2022 15:04
Show Gist options
  • Save Terkea/7477d76e582d064f08bf8b58f9d0efee to your computer and use it in GitHub Desktop.
Save Terkea/7477d76e582d064f08bf8b58f9d0efee to your computer and use it in GitHub Desktop.
Dockerfile java 1.8 maven and chrome driver for selenium tests
FROM ubuntu:22.04
# Update OS
RUN apt update
# Install wget
RUN apt install -y wget
RUN apt-get install -y openjdk-18-jdk
# # Install JAVA 1.8
# RUN wget "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245797_df5ad55fdd604472a86a45a217032c7d" -O java-8.tar.gz
# RUN mkdir /opt/java
# RUN tar -xvf java-8.tar.gz -C /opt/java
# RUN echo 'export PATH="$PATH://opt/java/jre1.8.0_321/bin"' >> ~/.bashrc
# RUN echo 'export JAVA_HOME="/opt/java/jre1.8.0_321"' >> ~/.bashrc
# # Install Maven 3.6.3
RUN wget https://mirrors.estointernet.in/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
RUN mkdir /opt/apache-maven-3.6.3
RUN tar -xvf apache-maven-3.6.3-bin.tar.gz -C /opt/
RUN echo 'export PATH="$PATH://opt/apache-maven-3.6.3/bin"' >> ~/.bashrc
# # Install Chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt install -y ./google-chrome-stable_current_amd64.deb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment