oncase / docker-pentaho-kettle

Pentaho Kettle Docker image - that leaves you free to configure kettle environment on runtime
4 stars 10 forks source link

Running spoon.sh #1

Open wibrt opened 4 years ago

wibrt commented 4 years ago

Can you use this dockersetup to run spoon.sh graphically?

Like for example: https://medium.com/@SaravSun/running-gui-applications-inside-docker-containers-83d65c0db110

marpontes commented 4 years ago

Though this wasn't tested, I see a good value in providing this way of using the image.

Did you give it a try?

Currently we're using this image for batch command line processing only, but it would be good to be able to use the image for Spoon as well.

wibrt commented 4 years ago

Marcello Pontes schreef op wo 01-04-2020 om 08:09 [-0700]:

Though this wasn't tested, I see a good value in providing this way of using the image. Did you give it a try?

after running $ docker run --net=host --env="DISPLAY" -- volume="$HOME/.Xauthority:/root/.Xauthority:rw" root/pdi:stable

i stumple upon: " OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 No protocol specified org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed] at org.eclipse.swt.SWT.error(SWT.java:4621) at org.eclipse.swt.widgets.Display.createDisplay(Display.java:1038) at org.eclipse.swt.widgets.Display.create(Display.java:1025) at org.eclipse.swt.graphics.Device.(Device.java:179) at org.eclipse.swt.widgets.Display.(Display.java:590) at org.eclipse.swt.widgets.Display.(Display.java:581) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:668) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja va:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso rImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92) "

Currently we're using this image for batch command line processing only, but it would be good to be able to use the image for Spoon as well. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

marpontes commented 4 years ago

Sure, my bad. The only command exposed on this image is run.sh which will execute either pan.sh or kitchen.sh.

I should expose another command -- spoon.sh -- on the Dockerfile and then give it a go.

wibrt commented 4 years ago

Marcello Pontes schreef op wo 01-04-2020 om 10:37 [-0700]:

Sure, my bad. The only command exposed on this image is run.sh which will execute either pan.sh or kitchen.sh. I should expose another command -- spoon.sh -- on the Dockerfile and then give it a go.

that is what i tried,but with my own dockerfile, based on yours

https://github.com/oncase/docker-pentaho-kettle/blob/master/Dockerfile# Lokaal gemaakt schone debian imageFROM root/minbase

Install primary dependenciesCOPY scripts/add_sources.sh .COPY

config/sid.list .COPY config/stretch.list .RUN ./add_sources.sh RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ rm -rf /tmp/*

Fix certificate issues, found as of

https://bugs.launchpad.net/ubuntu/+source/ca-certificates-java/+bug/983302RUN apt-get install -y ca-certificates-java && \ apt-get clean && \ update-ca-certificates -f && \ rm -rf /var/lib/apt/lists/*

Configs directories and users for pentaho RUN mkdir /pentaho && \

mkdir /home/pentaho && \ mkdir /home/pentaho/.kettle && \ mkdir /home/pentaho/.aws && \ groupadd -r pentaho && \ useradd -r -g pentaho -p $(perl -e'print crypt("pentaho", "aap")' ) -G sudo pentaho && \ chown -R pentaho.pentaho /pentaho && \ chown -R pentaho.pentaho /home/pentaho WORKDIR /pentahoUSER pentahoARG PENTAHO_DOWNLOAD_URL= https://sourceforge.net/projects/pentaho/files/latest/download

Downloads pentaho#RUN wget -q -O kettle.zip ${PENTAHO_DOWNLOAD_URL}

&& # unzip -qq kettle.zip && # rm -rf kettle.zip

in commentaar zetten als build ok, en bovenstaande uit commentaar

halen en testenCOPY kettle.zip .RUN unzip -qq kettle.zip && \ rm -rf kettle.zip WORKDIR /pentaho/data-integration

Adds connections config filesADD --chown=pentaho:pentaho scripts/* ./

Changes spoon.sh to expose memory to env-varsRUN sed -i \ 's/-Xmx[0-

9]+m/-Xmx\${_RUN_XMX:-2048}m/g' spoon.sh ENV PDI_HOME /pentaho/data-integration

RUN sudo apt-get update && # sudo apt-get install -y

# python3-pip # python3-setuptools # groff # less # && pip3 install --upgrade pip # && sudo apt- get clean

RUN sudo python3 -m pip --no-cache-dir install --upgrade awscli

ENTRYPOINT ["/pentaho/data-integration/spoon.sh"]# https://medium.com/@SaravSun/running-gui-applications-inside-docker-containers-83d65c0db110 id="-x-evo-selection-start-marker">

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. -- mvg, Wim Bertels

Lector UC Leuven-Limburg

A kind of Batman of contemporary letters. -- Philip Larkin on Anthony Burgess

zwessels commented 1 year ago

just in case this would be useful to somebody else, here are steps to get this working:

  1. install libwebkitgtk & xauth
... sudo apt install -y openjdk-8-jdk libwebkitgtk-1.0-0 xauth && ....
  1. on the host machine run xauth list. this should give you something like:
serverdg/unix:12  MIT-MAGIC-COOKIE-1  7270008abd9f949a9b1af76c7742da9e
  1. add the cookie to the docker image

    RUN xauth add serverdg/unix:12  MIT-MAGIC-COOKIE-1  7270008abd9f949a9b1af76c7742da9e
  2. change the entrypoint to spoon

    ENTRYPOINT ["/pentaho/data-integration/spoon.sh"]

now, run the container:

docker run --rm -d --net=host --env="DISPLAY" <image:tag>