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 Aug 21, 2020
1 parent f52f53d commit e2d1d7e
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 3 deletions.
99 changes: 99 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
FROM ubuntu:groovy as KiteBase

ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive

USER root
RUN apt update
RUN apt -y upgrade
RUN apt update
RUN apt -y install \
curl \
dirmngr \
apt-transport-https \
lsb-release \
ca-certificates \
default-jre \
default-jdk \
openjdk-8-jdk \
maven \
git \
gcc \
build-essential \
nano \
wget \
dpkg \
unzip \
xvfb \
nodejs \
fonts-liberation \
libappindicator3-1 \
libgbm1 \
libgtk-3-0 \
libxss1 \
xdg-utils \
keyboard-configuration \
nmap \
xterm
RUN apt -y update
RUN apt -y install npm

# 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
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 testpathdir
ENV KITE_TEST_PATH=$testpathdir
ARG configfilename
ENV KITE_CONFIG_NAME=$configfilename

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 ./scripts/

ADD pom.xml /KITE/pom.xml

VOLUME /KITE/$KITE_TEST_PATH
VOLUME /KITE/scripts

WORKDIR /KITE/$KITE_TEST_PATH

ENTRYPOINT ["/KITE/scripts/entrypoint.sh"]
7 changes: 5 additions & 2 deletions KITE-AppRTC-Test/configs/js.iceconnection.apprtc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"grids": [
{
"type": "local",
"url": "http://localhost:4444/wd/hub"
"url": "http://hub:4444/wd/hub"
}
],
"tests": [
Expand All @@ -17,6 +17,7 @@
"url": "https://appr.tc",
"port": 30000,
"testTimeout": 60,
"windowSize": "800x600",
"getStats" : {
"enabled": true,
"statsCollectionTime": 2,
Expand All @@ -30,7 +31,9 @@
"clients": [
{
"browserName": "chrome",
"platform": "localhost"
"platform": "localhost",
"platform": "LINUX",
"headless": true
}
]
}
2 changes: 1 addition & 1 deletion KITE-AppRTC-Test/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"license": "ISC",
"dependencies": {
"kite-common": "^0.1.14",
"express": "^4.15.2",
"kite-common": "^0.1.14",
"socket.io": "^2.2.0"
}
}
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# To execute this docker-compose yml file use `docker-compose -f <file_name> up`
# Add the `-d` flag at the end for detached execution
version: "3"
services:
hub:
image: selenium/hub:3.141.59
container_name: hub
ports:
- 4444:4444

chrome:
image: selenium/node-chrome:3.141.59
depends_on:
- hub
environment:
- HUB_HOST=hub

kite:
build:
context: .
args:
testpathdir: KITE-AppRTC-Test
configfilename: js.iceconnection.apprtc.config.json
volumes:
- /dev/shm:/dev/shm
- ./KITE-AppRTC-Test:/KITE/KITE-AppRTC-Test
- ./scripts:/KITE/scripts
depends_on:
- hub
environment:
- HUB_HOST=hub
- HUB_PORT=4444
9 changes: 9 additions & 0 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash

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

cd /KITE/${KITE_TEST_PATH}

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

0 comments on commit e2d1d7e

Please sign in to comment.