Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Add Dockerfile and entrypoint files
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazarus404 committed Jul 20, 2020
1 parent 0c1035f commit dc78541
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
72 changes: 72 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
FROM selenium/standalone-chrome as KiteBase

ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive

USER root
RUN apt update
RUN apt install -y default-jre default-jdk openjdk-8-jdk maven git gcc build-essential
RUN apt-get install nano -y
RUN apt-get install -y sudo wget dpkg unzip xvfb nodejs npm fonts-liberation libappindicator3-1 libgbm1 libgtk-3-0 libxss1 xdg-utils libu2f-udev keyboard-configuration nmap deepin-terminal

#KITE
RUN git clone https://github.com/webrtc/KITE.git KITE

WORKDIR /KITE/
COPY ./scripts ./scripts/
COPY ./third_party ./third_party/
COPY ./configureLinux.sh .

RUN chmod +x *.sh ./configureLinux.sh

ENV KITE_HOME=/KITE
RUN export KITE_HOME
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

RUN export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/bin
#RUN export PATH=$PATH:$JAVA_HOME/bin
ENV MAVEN_HOME=/usr/share/maven
RUN export MAVEN_HOME
RUN /bin/bash -c "source ~/.bashrc"
RUN echo 'export PATH=$PATH:/KITE/localGrid/chrome' >> ~/.bashrc

ARG TEST_PATH_DIR
ENV KITE_TEST_PATH=$TEST_PATH_DIR
ARG CONFIG_FILE_NAME
ENV KITE_CONFIG_NAME=$CONFIG_FILE_NAME

WORKDIR /KITE/$KITE_TEST_PATH
RUN /KITE/scripts/linux/path/c all
WORKDIR /KITE

RUN yes | /KITE/configureLinux.sh

FROM KiteBase

COPY ./KITE-Framework .
COPY ./KITE-Engine .
COPY ./scripts/linux/setupLocalGrid.sh .
COPY ./scripts/linux/gridConfig.sh .
COPY ./scripts/linux/path/c .
COPY ./scripts/linux/path/r .
COPY ./scripts/linux/path/t .
COPY ./scripts/linux/path/a .
COPY ./scripts/linux/path/kite_init .
COPY ./scripts/linux/createFolderLocalGrid.sh .
COPY ./scripts/linux/installChrome.sh .
COPY ./scripts/linux/installFirefox.sh .
COPY ./scripts/linux/installSelenium.sh .
COPY ./scripts/linux/installMaven.sh .
COPY ./scripts/linux/installDrivers.sh .
COPY ./scripts/linux/interactiveInstallation.sh .
COPY ./scripts/entrypoint.sh .

ADD pom.xml /KITE/pom.xml

VOLUME /KITE/$KITE_TEST_PATH

USER root

WORKDIR /KITE/$KITE_TEST_PATH

ENTRYPOINT ["/KITE/entrypoint.sh"]
13 changes: 13 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /bin/bash

cd "/KITE/${KITE_TEST_PATH}/js"
rm -rf node_modules
npm i

cd /KITE/${KITE_TEST_PATH}

/KITE/localGrid/startGrid.sh

sleep 5

/KITE/r "configs/${KITE_CONFIG_NAME}"

0 comments on commit dc78541

Please sign in to comment.