From 3875f674669e45e4fa0be3e6e1a48cacd7e2728b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 24 Aug 2022 18:34:04 +0200 Subject: [PATCH] Update 0.0.3: add support for HPE ilo3 on Ubuntu 16.04 --- Dockerfile-ubuntu-14.04 | 14 ++++++++++ Dockerfile => Dockerfile-ubuntu-16.04 | 4 +-- README.md | 17 ++++++++++++ deployment.yaml | 14 +++++----- job.yaml | 40 +++++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 Dockerfile-ubuntu-14.04 rename Dockerfile => Dockerfile-ubuntu-16.04 (76%) create mode 100644 job.yaml diff --git a/Dockerfile-ubuntu-14.04 b/Dockerfile-ubuntu-14.04 new file mode 100644 index 0000000..0edc687 --- /dev/null +++ b/Dockerfile-ubuntu-14.04 @@ -0,0 +1,14 @@ +FROM ubuntu:14.04 + +# Required for instaling packages +USER root + +RUN apt-get update && apt-get -y install x11vnc xvfb firefox jwm \ + iceweasel openjdk-6-jre tzdata-java icedtea-6-plugin icedtea-netx \ + && update-alternatives --set javaws /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws + +RUN mkdir ~/.vnc && \ + echo "firefox &" > ~/.xinitrc && \ + echo "exec jwm" >> ~/.xinitrc && \ + chmod 755 ~/.xinitrc +ENTRYPOINT ["/usr/bin/x11vnc", "-forever", "-create"] diff --git a/Dockerfile b/Dockerfile-ubuntu-16.04 similarity index 76% rename from Dockerfile rename to Dockerfile-ubuntu-16.04 index 162b7ab..d3c8748 100644 --- a/Dockerfile +++ b/Dockerfile-ubuntu-16.04 @@ -1,4 +1,3 @@ -#FROM ubuntu:14.04 FROM ubuntu:16.04 # Required for instaling packages @@ -7,8 +6,7 @@ USER root RUN apt-get update && apt-get -y install x11vnc xvfb firefox jwm \ icedtea-8-plugin icedtea-netx -#&& update-alternatives --set javaws /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/javaws - +RUN echo "jdk.tls.disabledAlgorithms=TLSv1.1, TLSv1.2" >> /etc/java-8-openjdk/security/java.security RUN mkdir ~/.vnc && \ echo "firefox &" > ~/.xinitrc && \ diff --git a/README.md b/README.md index 8cf454e..c197361 100644 --- a/README.md +++ b/README.md @@ -30,16 +30,33 @@ docker push ungleich/firefox-java-vnc ## Changelog +### 0.0.3 + +* Updated version of Ubuntu 16.04 + * docker build -t ungleich/firefox-java-vnc:0.0.3 -f Dockerfile-ubuntu-16.04 . + * docker push ungleich/firefox-java-vnc:0.0.3 +* Contains the java.security patch noted in 0.0.2 +* Added k8s job definition for testing + ### 0.0.2 * Switched to Ubuntu 16.04 as the base image * Added kubernetes sample deployment * Does not work with iDRAC 6 +* Error with HPE ilo3: + * Caused by: net.sourceforge.jnlp.LaunchException: Fatal: + Initialization Error: Unknown Main-Class. Could not determine the + main class for this application. + * Can be fixed using echo "jdk.tls.disabledAlgorithms=TLSv1.1, + TLSv1.2" >> /etc/java-8-openjdk/security/java.security + * Hint found on https://github.com/niclan/Javafox/issues/12 ### 0.0.1 * Initial release based on Ubuntu 14.04 * Works with iDRAC 6 +* Error with HPE ilo3: + * Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed. ## Credit diff --git a/deployment.yaml b/deployment.yaml index 40188dd..24a7564 100644 --- a/deployment.yaml +++ b/deployment.yaml @@ -1,20 +1,20 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: ungleich-firefox-java-vnc + name: ungleich-firefox-java-vnc002 spec: selector: matchLabels: - app: ungleich-firefox-java-vnc + app: ungleich-firefox-java-vnc002 replicas: 1 template: metadata: labels: - app: ungleich-firefox-java-vnc + app: ungleich-firefox-java-vnc002 spec: containers: - name: firefox - image: ungleich/firefox-java-vnc:0.0.1 + image: ungleich/firefox-java-vnc:0.0.2 imagePullPolicy: Always volumeMounts: - mountPath: /dev/shm @@ -34,13 +34,13 @@ spec: apiVersion: v1 kind: Service metadata: - name: ungleich-firefox-java-vnc + name: ungleich-firefox-java-vnc002 labels: - app: ungleich-firefox-java-vnc + app: ungleich-firefox-java-vnc002 spec: type: ClusterIP ports: - port: 5900 name: vnc selector: - app: ungleich-firefox-java-vnc + app: ungleich-firefox-java-vnc002 diff --git a/job.yaml b/job.yaml new file mode 100644 index 0000000..64ca22d --- /dev/null +++ b/job.yaml @@ -0,0 +1,40 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: ungleich-firefox-java-vnc +spec: + template: + spec: + restartPolicy: Never + containers: + - name: firefox + image: ungleich/firefox-java-vnc:0.0.1 + imagePullPolicy: Always + volumeMounts: + - mountPath: /dev/shm + name: cache-volume + + securityContext: + privileged: true + capabilities: + add: ["SYS_ADMIN" ] + + volumes: + - emptyDir: + medium: Memory + sizeLimit: 2Gi + name: cache-volume +# --- +# apiVersion: v1 +# kind: Service +# metadata: +# name: ungleich-firefox-java-vnc2 +# labels: +# app: ungleich-firefox-java-vnc2 +# spec: +# type: ClusterIP +# ports: +# - port: 5900 +# name: vnc +# selector: +# app: ungleich-firefox-java-vnc2