In a previous post I wrote about getting started with Flowable.

In this post, we'll build Flowable ('build from source') and then create a Docker image.

Prerequisites

Install Git, Ant, Maven and Asciidoctor

Install Git

Its always a good idea to check for updates:

brew update

To install Git using Homebrew, enter the following command:

brew install git

After you have installed Git, you can check the version by running the following command:

git --version 

You should see output like:

git version 2.18.0

Install Ant

To install Ant enter the following command:

brew install ant

You can check the version by running the following command:

ant -version

You should see output like:

Apache Ant(TM) version 1.10.5 compiled on July 10 2018

Install Maven

To install Maven enter the following command:

brew install maven

You can check the version by running the following command:

mvn -version

You should see output like:

Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T05:41:47+11:00)
Maven home: /usr/local/Cellar/maven/3.6.0/libexec
Java version: 1.8.0_144, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_AU, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"

Install Asciidoctor

To install Asciidoctor enter the following command:

brew install asciidoctor

Build Flowable (6.4.1)

Clone Flowable's GitHub repository:

git clone -b flowable-release-6.4.1 https://github.com/flowable/flowable-engine.git

Then enter the following commands:

cd flowable-engine/distro
ant

You should see output like:

...

distro:
      [zip] Building zip: .../zip/flowable-6.4.1-6.zip

BUILD SUCCESSFUL
Total time: 24 minutes 18 seconds

Navigate to the /wars directory:

cd target/zip/flowable-6.4.1-6/wars
ls

You should see output like:

-rw-r--r--   1 robinyo  staff  42504440  4 Jan 19:47 flowable-admin.war
-rw-r--r--   1 robinyo  staff  34645104  4 Jan 19:47 flowable-idm.war
-rw-r--r--   1 robinyo  staff  41910306  4 Jan 19:47 flowable-modeler.war
-rw-r--r--   1 robinyo  staff  42869127  4 Jan 19:47 flowable-rest.war
-rw-r--r--   1 robinyo  staff  52110316  4 Jan 19:47 flowable-task.war

Docker

I updated the all-in-one Dockerfile to use Tomcat v8.5.37:

...

RUN wget http://apache.mirror.serversaustralia.com.au/tomcat/tomcat-8/v8.5.37/bin/apache-tomcat-8.5.37.tar.gz -O /tmp/tomcat.tar.gz
RUN cd /tmp && tar xvfz tomcat.tar.gz && cp -Rv /tmp/apache-tomcat-8.5.37/* /opt/tomcat/ && rm -Rf /tmp/apache-tomcat-8.5.37

...

I updated the all-in-one build script as follows:


...

echo "Building Docker image"

docker build -t flowable/all-in-one:6.4.1-SNAPSHOT .

Note: If you receive the following error:

Step 6/17 : COPY assets/flowable-idm.war.original /opt/tomcat/webapps/flowable-idm.war
COPY failed: stat /var/lib/docker/tmp/docker-builder251794358/assets/flowable-idm.war.original: no such file or directory

Then you need to manually create the /assets directory:

├── /flowable-engine
    └── /docker
        └── /all-in-one
            └── /assets

To build the all-in-one Docker image enter the following command:

cd docker/all-in-one
./build.sh

You should see output like:

...

Copying artifact
Building Docker image

...

Successfully built 42ac51a7cd87
Successfully tagged flowable/all-in-one:6.4.1-SNAPSHOT

Where is your image? It’s in your machine’s local Docker image registry:

docker image ls

You should see output like:

REPOSITORY                     TAG                 IMAGE ID            CREATED             SIZE
flowable/all-in-one            6.4.1-SNAPSHOT      4ce4654af3b1        7 seconds ago       443MB

To launch your tagged image:

docker run -p 8080:8080 flowable/all-in-one:6.4.1-SNAPSHOT
References: