Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2020-02-27 12:13:43 +0000
committerSravan Kumar Lakkimsetti2020-02-27 12:14:03 +0000
commit07af371ab0d1331f5ae761369199aac7a3d9abb4 (patch)
treead02a1093897191de3fc7aeb9d3a7c6696b87501
parent0b740206199337d21efc17e8f81b32f67e3bd700 (diff)
downloadeclipse.platform.releng.aggregator-07af371ab0d1331f5ae761369199aac7a3d9abb4.tar.gz
eclipse.platform.releng.aggregator-07af371ab0d1331f5ae761369199aac7a3d9abb4.tar.xz
eclipse.platform.releng.aggregator-07af371ab0d1331f5ae761369199aac7a3d9abb4.zip
Added docker file for ubuntu
Change-Id: I49685b6285d7d3db1268f36b1d5ee410ea27e6d8 Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
-rw-r--r--cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/Dockerfile43
-rw-r--r--cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/uid_entrypoint7
-rw-r--r--cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_metacity.sh11
-rw-r--r--cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_mutter.sh11
4 files changed, 72 insertions, 0 deletions
diff --git a/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/Dockerfile b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/Dockerfile
new file mode 100644
index 000000000..903beb14c
--- /dev/null
+++ b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/Dockerfile
@@ -0,0 +1,43 @@
+FROM ubuntu:18.04
+
+### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
+COPY scripts/uid_entrypoint /usr/local/bin/uid_entrypoint
+RUN chmod u+x /usr/local/bin/uid_entrypoint && \
+ chgrp 0 /usr/local/bin/uid_entrypoint && \
+ chmod g=u /usr/local/bin/uid_entrypoint /etc/passwd
+ENTRYPOINT [ "uid_entrypoint" ]
+
+ENV DEBIAN_FRONTEND noninteractive
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ libgtk-3-0=3.22.* \
+ tigervnc-standalone-server \
+ tigervnc-common \
+ metacity \
+ x11-xserver-utils \
+ libgl1-mesa-dri \
+ xfonts-base \
+ xfonts-scalable \
+ xfonts-100dpi \
+ xfonts-75dpi \
+ fonts-liberation \
+ fonts-liberation2 \
+ fonts-freefont-ttf \
+ fonts-dejavu \
+ fonts-dejavu-core \
+ fonts-dejavu-extra \
+ wget \
+ curl \
+ && rm -rf /var/lib/apt/lists/*
+
+ENV HOME=/home/vnc
+ENV DISPLAY :0
+
+RUN mkdir -p ${HOME}/.vnc && chmod -R 775 ${HOME} \
+ && echo "123456" | vncpasswd -f > ${HOME}/.vnc/passwd \
+ && chmod 600 ${HOME}/.vnc/passwd
+
+# Create a custom vnc xstartup file
+COPY scripts/xstartup_metacity.sh ${HOME}/.vnc/xstartup.sh
+RUN chmod 755 ${HOME}/.vnc/xstartup.sh
+
+USER 10001
diff --git a/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/uid_entrypoint b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/uid_entrypoint
new file mode 100644
index 000000000..608f11708
--- /dev/null
+++ b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/uid_entrypoint
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+if ! whoami &> /dev/null; then
+ if [ -w /etc/passwd ]; then
+ echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
+ fi
+fi
+exec "$@" \ No newline at end of file
diff --git a/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_metacity.sh b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_metacity.sh
new file mode 100644
index 000000000..eef5b2c61
--- /dev/null
+++ b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_metacity.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env /bin/sh
+
+[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
+[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources
+
+Xvnc ${DISPLAY} -geometry 1440x900 -depth 16 -dpi 100 -PasswordFile ${HOME}/.vnc/passwd &
+sleep 2
+xsetroot -solid grey
+vncconfig -iconic &
+xhost +
+metacity --replace --sm-disable --display=${DISPLAY} & \ No newline at end of file
diff --git a/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_mutter.sh b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_mutter.sh
new file mode 100644
index 000000000..1c5858e68
--- /dev/null
+++ b/cje-production/dockerfiles/ubuntu-gtk3-metacity/18.04-gtk3.22/scripts/xstartup_mutter.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env /bin/sh
+
+[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
+[ -r ${HOME}/.Xresources ] && xrdb ${HOME}/.Xresources
+
+Xvnc ${DISPLAY} -geometry 1440x900 -depth 16 -dpi 100 -PasswordFile ${HOME}/.vnc/passwd &
+sleep 2
+xsetroot -solid grey
+vncconfig -iconic &
+xhost +
+mutter --replace --sm-disable --display=${DISPLAY} & \ No newline at end of file

Back to the top