In order to deploy a job cluster on Docker, one needs to create an image which contains the Flink binaries as well as the user code jars of the job to execute.
This directory contains a `build.sh` which facilitates the process.
The script takes a Flink distribution either from an official release, an archive or a local distribution and combines it with the specified job jar.
## Installing Docker
Install the most recent stable version of [Docker](https://docs.docker.com/installation/).
## Building the Docker image
Images are based on the official Java Alpine (OpenJDK 8) image.
Before building the image, one needs to build the user code jars for the job.
A Flink job can consist of multiple artifacts. In order to specify the required artifacts, they need to be passed to `--job-artifacts` of the build script. The individual paths are comma separated.
If you want to build the Flink image from the version you have checked out locally run:
If the --image-name flag is not used the built image name will be 'flink-job'.
Before Flink-1.8, the hadoop-version is required. And from Flink-1.8, the hadoop-version is optional and would download pre-bundled shaded Hadoop jar package if provided.