I am able to run my stand-alone Flink app from the command line like:
java -Xms15g -Xmx28g -jar stream-processing-1.3.jar
I need to run the application within the Docker container. From an example (Docker Compose JVM parameters), I understood I might pass those arguments inside the Docker file.
Questions:
I wonder if I could pass the above arguments inside the docker-compose.yml rather than the Docker file?
If so, should the command contain the main class file or the jar file?
How to pass those JVM arguments (XMX, XMS)?
This is the sample of my docker-compose-yml:
version: "2.2"
services:
jobmanager:
build: .
image: varimat-stream-processing:1.2
hostname: jobmanager
container_name: jobmanager
ports:
- "8081:8080"
command: standalone-job --job-classname com.StreamCommand
I ended up passing JVM arguments inside the Dockerfile and it worked: