Deploy a set of consumers in a wrapped container using this example Dockerfile.
FROM dcshock/forklift:1.1 # Add jar'd binks projects to the deployment directory ADD my.jar $FORKLIFT_CONSUMER_HOME/my.jar # See boot.sh file below ADD boot.sh /opt/boot.sh CMD ["/opt/boot.sh"]
Create a boot.sh file to start the server with your parameters.
#!/bin/bash cd /usr/local/forklift forklift-server tcp://127.0.0.1:61616 /usr/local/forklift/consumers
Note that forklift server starts with 2 parameters.
1) The connection string to activemq
2) The location of the consumers that will be monitored. Your consumer should be added to that directory. Note that these environment variables are present.
ENV FORKLIFT_HOME /usr/local/forklift ENV FORKLIFT_CONSUMER_HOME /usr/local/forklift/consumers