Camunda and Docker

I have been playing with Camunda and Docker and have been following these notes:-

My understanding of using docker volumes is that you can build a generic image and then wire-in specific environment config files at runtime such as the server.xml or the bpm-platform.xml according to your target environment by importing files from the host into the container.

docker run -d --name camunda -p 8080:8080
-v $PWD/bpm-platform.xml:/camunda/conf/bpm-platform.xml

However, while attempting to do this, i’m getting all kinds of wierd error messages

$ docker run -p 8080:8080 -v /d/KYV/AMAZON_WEB_SERVICE/Docker/camunda_image_build/camunda/conf/server.xml:/camunda/conf/server.xml ky3p-workflow-rds-devdb1:v1 C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused “process_linux.go:402: container init caused “rootfs_linux.go:58: mounting \”/d/KYV/AMAZON_WEB_SERVICE/Docker/camunda_image_build/camunda/conf/server.xml\” to rootfs \"/mnt/sda1/var/lib/docker/aufs/mnt/e6472bd00130080185a055cb00040da4da0e940850a2fea336700653fadbd695\" at \"/mnt/sda1/var/lib/docker/aufs/mnt/e6472bd00130080185a055cb00040da4da0e940850a2fea336700653fadbd695/camunda/conf/server.xml\" caused \“not a directory\”"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

I’m using version 18.03.0-ce on windows from a cygwin shell.
Other examples in the note are working fine such as building an image and running the camunda engine on a port of my choice.

david.kant@006 MINGW64 /d/KYV/AMAZON_WEB_SERVICE/Docker/camunda_image_build
$ ls -lhrt camunda/conf/
total 212K
-rw-r–r-- 1 david.kant 1098113 3.5K Jan 3 2017 bpm-platform.xml
-rw-r–r-- 1 david.kant 1098113 163K Jan 26 2017 web.xml
-rw-r–r-- 1 david.kant 1098113 7.0K Jun 4 12:33
-rw-r–r-- 1 david.kant 1098113 9.5K Jun 11 11:14 server_h2.xml
-rw-r–r-- 1 david.kant 1098113 9.5K Jun 11 11:15 server_oracle.xml
-rw-r–r-- 1 david.kant 1098113 9.5K Jun 11 12:41 server.xml

When building my image, my Dockerfile looks like this:-

FROM camunda/camunda-bpm-platform:tomcat-latest
ADD camunda/webapps/workflow-processes.war /camunda/webapps/workflow-processes.war

Any help would be gratefully appreciated.

Thank you.


I would guess that the windows docker process cannot resolve the path /d/KYV/AMAZON_WEB_SERVICE/Docker/camunda_image_build/camunda/conf/server.xml. If I remember correctly the /d/ is cygwin magic to make the windows file system accessible. Maybe you can try to use the normal Windows path like D:\... to specify the volume source when you run the docker container?


Or based on this comment maybe another slash in front of the path may work?

Thanks Sebastian,

Leading / worked but I had to change my run command to specify directories rather than a filename.

When doing so, I get a new error

docker run -p 8080:8080 -v //d/KYV/AMAZON_WEB_SERVICE/Docker/camunda_image_build/camunda/conf:/camunda/conf ky3p-workflow-rds-devdb1:v1
Is a directory: gzread()
/camunda/conf/server.xml:1.1: Document is empty

To me it looks like the contents of my host directory are not visible to the container?

Which docker windows setup do you use? Do you have a Virtualbox/Boot2Docker setup or the new docker + Hyper-V setup?

I’m using VirtualBox/Boot2Docker on Windows 7 Enterprise.

Additional Information

In order to allow the container access to the host file-system, the virtual machine must be permissioned.
In VirtualBox, you can select the VM image and check its settings under the Shared Folder tab.
The default is C/Users

You can place environment configuration files in this shared folder, or create a new shared folder.

Then to inject configuration files into camunda you do

docker run -p 8080:8080 -v //c/Users/tmp/conf/server.xml://camunda/conf/server.xml ky3p-workflow-rds-devdb1:v1