-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#77) separated image into Sakuli base and Sakuli installation image
- Loading branch information
Showing
3 changed files
with
164 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# This Dockerfile is used to build the Sakuli image from sakuli-base | ||
|
||
FROM taconsol/sakuli-base | ||
|
||
ARG SAKULI_VERSION | ||
ARG NPM_ACCESS_TOKEN | ||
ARG BUILD_DATE | ||
|
||
# Ensure mandatory args are set | ||
RUN test -n "${SAKULI_VERSION}" && \ | ||
test -n "${NPM_ACCESS_TOKEN}" && \ | ||
test -n "${BUILD_DATE}" | ||
|
||
LABEL maintainer="simon.hofmann@consol.de" \ | ||
io.k8s.description="Sakuli Test Container with OpenBox window manager" \ | ||
io.k8s.display-name="Sakuli Test Container based on Ubuntu" \ | ||
io.openshift.expose-services="6901:http,5901:xvnc" \ | ||
io.openshift.tags="vnc, ubuntu, openbox" \ | ||
io.openshift.non-scalable=true | ||
|
||
ENV REFRESHED_AT=${BUILD_DATE} \ | ||
IMG=taconsol/sakuli \ | ||
NPM_TOKEN=REPLACE_WITH_YOUR_NPM_TOKEN \ | ||
SAKULI_EXECUTION_DIR=/testsuite_execution \ | ||
LOG_MODE=ci | ||
|
||
USER 0 | ||
|
||
### Create SAKULI_EXECUTION_DIR and set permissions correctly | ||
RUN mkdir ${SAKULI_EXECUTION_DIR} && chmod 777 ${SAKULI_EXECUTION_DIR} | ||
|
||
COPY ./src/sakuli/sakuli.sh $INST_SCRIPTS/ | ||
RUN chmod a+x $INST_SCRIPTS/sakuli.sh | ||
|
||
USER 1000:1000 | ||
|
||
### Install Sakuli | ||
RUN $INST_SCRIPTS/sakuli.sh $SAKULI_VERSION $NPM_ACCESS_TOKEN | ||
|
||
RUN $INST_SCRIPTS/startup.sh | ||
|
||
ENTRYPOINT ["/dockerstartup/startup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# This Dockerfile is used to build an headles vnc image based on Ubuntu | ||
# Used to run CI jobs for nut.js | ||
ARG BASE_IMAGE_VERSION=18.04 | ||
FROM ubuntu:$BASE_IMAGE_VERSION | ||
|
||
ARG NODE_VERSION | ||
ARG BUILD_DATE | ||
|
||
# Ensure mandatory args are set | ||
RUN test -n "${NODE_VERSION}" && \ | ||
test -n "${BUILD_DATE}" | ||
|
||
LABEL maintainer="simon.hofmann@consol.de" \ | ||
io.k8s.description="Sakuli Base Container with OpenBox window manager" \ | ||
io.k8s.display-name="Sakuli Base Container based on Ubuntu" \ | ||
io.openshift.expose-services="6901:http,5901:xvnc" \ | ||
io.openshift.tags="vnc, ubuntu, openbox" \ | ||
io.openshift.non-scalable=true | ||
|
||
ENV REFRESHED_AT=${BUILD_DATE} \ | ||
LANG='en_US.UTF-8' \ | ||
LANGUAGE='en_US:en' \ | ||
LC_ALL='en_US.UTF-8' \ | ||
DISPLAY=:1 \ | ||
VNC_PORT=5901 \ | ||
NO_VNC_PORT=6901 \ | ||
HOME=/headless \ | ||
TERM=xterm \ | ||
STARTUPDIR=/dockerstartup \ | ||
INST_SCRIPTS=/headless/install \ | ||
NO_VNC_HOME=/headless/noVNC \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
VNC_COL_DEPTH=24 \ | ||
VNC_RESOLUTION=1280x1024 \ | ||
VNC_PW=vncpassword \ | ||
VNC_VIEW_ONLY=false \ | ||
IMG=taconsol/sakuli-base | ||
|
||
EXPOSE $VNC_PORT $NO_VNC_PORT | ||
|
||
WORKDIR $HOME | ||
|
||
### Copy all install scripts for further steps | ||
COPY ./src/common/install/ $INST_SCRIPTS/ | ||
RUN find $INST_SCRIPTS -name '*.sh' -exec chmod a+x {} + | ||
|
||
### Install required packages and add configuration | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
wget \ | ||
locales \ | ||
gnome-calculator \ | ||
xfce4-screenshooter \ | ||
git \ | ||
nitrogen \ | ||
rsync \ | ||
libnss3-tools \ | ||
build-essential \ | ||
libxtst-dev \ | ||
net-tools \ | ||
python-numpy \ | ||
chromium-browser \ | ||
chromium-chromedriver \ | ||
chromium-browser-l10n \ | ||
chromium-codecs-ffmpeg \ | ||
firefox \ | ||
firefox-geckodriver \ | ||
openbox \ | ||
obconf \ | ||
obmenu \ | ||
xterm \ | ||
x11-xkb-utils \ | ||
libnss-wrapper \ | ||
gettext \ | ||
curl \ | ||
iputils-ping \ | ||
iputils-tracepath \ | ||
dnsutils && \ | ||
apt-get clean -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* /var/cache/apt/* && \ | ||
locale-gen en_US.UTF-8 && \ | ||
wget -qO- https://dl.bintray.com/tigervnc/stable/tigervnc-1.9.0.x86_64.tar.gz | tar xz --strip 1 --no-same-owner --no-same-permissions -C / && \ | ||
mkdir -p $NO_VNC_HOME/utils/websockify && \ | ||
wget -qO- https://github.com/novnc/noVNC/archive/v1.0.0.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME && \ | ||
wget -qO- https://github.com/novnc/websockify/archive/v0.6.1.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME/utils/websockify && \ | ||
chmod +x -v $NO_VNC_HOME/utils/*.sh && \ | ||
ln -s $NO_VNC_HOME/vnc_lite.html $NO_VNC_HOME/index.html && \ | ||
ln -s /usr/bin/chromium-browser /usr/bin/google-chrome && \ | ||
echo "CHROMIUM_FLAGS='--no-sandbox --user-data-dir'" > $HOME/.chromium-browser.init | ||
|
||
COPY ./src/common/wm/ $HOME/ | ||
COPY ./src/common/config/openbox /etc/xdg/openbox | ||
COPY ./src/common/config/vnc $HOME/.vnc | ||
|
||
### Copy env scripts for startup | ||
COPY ./src/common/env/ $STARTUPDIR/env | ||
|
||
COPY ./src/common/firefox_profile/certificate-profile $HOME/firefox-certificates/ | ||
COPY ./src/common/chrome_certificate_store/ $HOME/.pki/ | ||
|
||
### configure startup | ||
COPY ./src/common/scripts $STARTUPDIR | ||
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME | ||
|
||
### configure startup | ||
COPY ./src/common/scripts $STARTUPDIR | ||
RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME | ||
|
||
USER 1000:1000 | ||
|
||
### Install nvm | ||
RUN $INST_SCRIPTS/nvm.sh $NODE_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters