Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating the plugin into the "Camunda Docker Run" image #16

Closed
MrRickwi opened this issue Jul 5, 2021 · 8 comments
Closed

Integrating the plugin into the "Camunda Docker Run" image #16

MrRickwi opened this issue Jul 5, 2021 · 8 comments

Comments

@MrRickwi
Copy link

MrRickwi commented Jul 5, 2021

Hi, is there any way to integrate the plugin into the "Camunda Docker Run" image which can be found here:

docker pull camunda/camunda-bpm-platform:run-7.15.0

I tried it with a Dockerfile like this:

ARG base_image_version=run-7.15.0

FROM camunda/camunda-bpm-platform:${base_image_version}
COPY camunda-history-plugin/ /camunda/webapps/camunda/app/cockpit/scripts/
COPY camunda-cockpit-ui.js /camunda/webapps/camunda/app/cockpit/scripts/

with no success. Any hints? Interesting part: The file camunda-cockpit-ui.js is missing in the run image, so I suppose this image is stripped down not to support any plugins. Right?

@datakurre
Copy link
Owner

@MrRickwi I recall that the run image has everything baked into JAR-files and it does not support reading plugins out of those JARs. I believe that you should be able to adapt the examples in the forum https://forum.camunda.org/t/minimal-cockpit-history-plugins-for-camunda-7-14-0/24651/17 to get the plugin files into the image. You should not need to add camunda-cockpit-ui.js, because it should be already there.

@MrRickwi
Copy link
Author

MrRickwi commented Jul 6, 2021

That solved the problem: My final minimal Dockerfile for Camunda Run looks now like this:

FROM camunda/camunda-bpm-platform:run-7.15.0

COPY --chown=camunda:camunda camunda-history-plugin/* /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/

USER root
RUN apk add --no-cache zip
RUN zip -r internal/webapps/camunda-webapp-webjar-7.15.0.jar META-INF
RUN rm -r META-INF
USER camunda

I think it would help to include this in README.md... Thanks a lot!

@datakurre
Copy link
Owner

I add link from README to this issue 👼

@fliot
Copy link

fliot commented Jul 20, 2021

Same thing, into a single Dockerfile:

FROM camunda/camunda-bpm-platform:run-7.15.0

USER root
RUN apk add --no-cache git zip
RUN git clone https://github.com/datakurre/camunda-cockpit-plugins.git /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN chown camunda:camunda /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN zip -r internal/webapps/camunda-webapp-webjar-7.15.0.jar META-INF
RUN rm -r META-INF
USER camunda

I love your project, it's fabulous !!!

@mlifty
Copy link

mlifty commented Jul 19, 2022

Neither of theses solutions worked for me on version 7.16

To get the plugin installed:

  1. I cloned and built the history plugin project
  2. Copied the required files to the root of my docker build folder
  3. Then used docker COPY to copy required files to into 'scripts' directory, see dockerfile below:
  4. Build image

dockerfile:

# Specify the version
FROM camunda/camunda-bpm-platform:tomcat-7.16.0

# Add Camunda History Plugin
COPY  definition-historic-activities.js /camunda/webapps/camunda/app/cockpit/scripts/
COPY  instance-historic-activities.js /camunda/webapps/camunda/app/cockpit/scripts/
COPY  instance-route-history.js /camunda/webapps/camunda/app/cockpit/scripts/
COPY  robot-module.js /camunda/webapps/camunda/app/cockpit/scripts/
COPY  config.js /camunda/webapps/camunda/app/cockpit/scripts/

Note: For COPY to work files need to be copied from the same directory as the dockerfile i.e. root

I also found watching this video helpful to give some more context/insight into plugin development:
https://www.youtube.com/watch?v=BwsoozZRAqo

Thanks for the plugin it is awesome! great work :)

@arkanoid87
Copy link

FROM camunda/camunda-bpm-platform:run-7.15.0

USER root
RUN apk add --no-cache git zip
RUN git clone https://github.com/datakurre/camunda-cockpit-plugins.git /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN chown camunda:camunda /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN zip -r internal/webapps/camunda-webapp-webjar-7.15.0.jar META-INF
RUN rm -r META-INF
USER camunda

I can confirm that plugin Dockerfile are working fine on 7.19

FROM camunda/camunda-bpm-platform:run-7.19.0

USER root
RUN apk add --no-cache git zip
RUN git clone https://github.com/datakurre/camunda-cockpit-plugins.git /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN chown camunda:camunda /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN zip -r internal/webapps/camunda-webapp-webjar-7.15.0.jar META-INF
RUN rm -r META-INF
USER camunda

@fliot
Copy link

fliot commented Jan 9, 2024

Works also with 7.20.0.
Thanks

@philipz
Copy link
Contributor

philipz commented Aug 29, 2024

It also works with 7.21.0.
Thanks!

FROM camunda/camunda-bpm-platform:run-7.21.0

USER root
RUN apk add --no-cache git zip
USER camunda
RUN git clone https://github.com/datakurre/camunda-cockpit-plugins.git /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN chown camunda:camunda /camunda/META-INF/resources/webjars/camunda/app/cockpit/scripts/
RUN zip -r internal/webapps/camunda-webapp-webjar-7.15.0.jar META-INF
RUN rm -r META-INF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants