Use docker-compose can't find BPMN file

Hi, I am using docker-compose on Ubuntua 18.04 to try and deploy a bpmn file using:

docker-compose -f docker-compose.yml exec zeebe zbctl --insecure deploy order-process.bpmn

The bpmn file is in the docker folder ( in fact i tried various different locations and paths to it without success and always get a no such file or directory:
osboxes@osboxes:~/Projects/zeebe/kafka-connect-zeebe/docker$ docker-compose -f docker-compose.yml exec zeebe zbctl --insecure deploy order-process.bpmn
2020/02/11 18:07:55 open order-process.bpmn: no such file or directory

Am i doing something stupid? thanks

1 Like

@Greco66 you probably need to mount a volume to be able to do that… that is purely docker compose and docker… not a Zeebe question. you will have the same problem with any other file.

Hi @Greco66, alternatives:

Using zbctl in a docker container (slim container at sitapati/zbctl) requires mounting a volume, which is only really worth it when you script it (like in a CI system or build scripts in a repo to reduce deps on checkout).

Here is how you do it, for reference:

docker run --mount .:/bpmn sitapati/zbctl --insecure deploy /bpmn/order-process.bpmn

You could alias this in BASH:

# Only works for models in the current directory, requires more sophisticated handling for relative pathing
function zbdeploy() {
    docker run --mount .:/bpmn sitapati/zbctl --insecure deploy /bpmn/$1

Neither of these examples deal with the container needing to contact the broker. For that you need to explicitly give it config, and your broker needs to be reachable on a network that this container can reach - either an external network or a docker network that you specify when running the container.

Here is how you would run this with enough config to deploy to Camunda Cloud (you need to set the client credentials in your environment first):

  --mount .:/bpmn sitapati/zbctl --insecure deploy /bpmn/order-process.bpmn


1 Like

Hi @jwulf.

Thanks for the excellent answer. i didn’t even think of installing zbctl and using it outside of the docker container. Worked a treat.