Packaging For Deployment¶
Stateful Functions applications can be packaged as either standalone applications or Flink jobs that can be submitted to a cluster.
The recommended deployment mode for Stateful Functions applications is to build a Docker image. This way, user code does not need to package any Apache Flink components. The provided base image allows teams to package their applications with all the necessary runtime dependencies quickly.
Below is an example Dockerfile for building a Stateful Functions image for an application called
FROM stateful-functions RUN mkdir -p /opt/stateful-functions/modules/stateful-functions-example COPY target/stateful-functions-example*jar /opt/stateful-functions/modules/stateful-functions-example/