Deploying WAR file to Docker container using Tomcat not working

Hi,

I am attempting to follow the instructions on github for deploying a WAR file into the /camunda/webapps directory for when I run docker. I can see the WAR file is successfully copied into the /camunda/webapps directory. Yet, my BPMN is not automatically deployed. All I see is that Invoice Receipt process.

These are the commands I am running:
docker pull camunda/camunda-bpm-platform:tomcat-latest

docker run -d --name camunda -v /PATH_TO_TARGET/target/workflow.war:/camunda/webapps/workflow.war -it -p 8080:8080 camunda/camunda-bpm-platform:tomcat-latest

I was able to deploy this exact same WAR file when I just ran a Tomcat server locally and copying over the war file to the webapps folder. So, it shouldn’t be an issue with the BPMN itself.

Any suggestions would greatly help.

Thanks,
Rey

Turns out the best answer to this question is that Windows and Docker are not friends. https://medium.com/faun/hey-docker-why-you-hate-windows-so-much-de7a7aa4dd7. I got this working by simply building a docker image from a Dockerfile that pulls from camunda/camunda-bpm-platform:latest and copies over my war file to /camunda/webapps/. Then, running this image worked just fine! Only took a whole day of head scratching.

It would be a good add to have a warning in the camunda docker page to suggest building the docker image with WAR file via a Dockerfile rather than using the -v argument on the deploy run

2 Likes

Hi @reyolivo,

It’s great that you found a solution to the problem. Feel free to provide a PR to the repo: https://github.com/camunda/docker-camunda-bpm-platform or raise an issue on our issue tracker: https://app.camunda.com/jira/

Best,
Nikola

Thank you reyolivo…after 1 day of frustration cased because docker and Windows are not friends ;)…I came to this post and I understood where it was going wrong!

I solved it using “docker cp” command.

1 Like