Docker spin up scala [on hold]

I have a scala file with some functions. I need to execute the scala file through a shell script. The shell script should run when the docker image is built for the project. The functions in scala file reads data from S3 and assigns to a variable. so when the docker image spun up, I can pass some arguments against the scala file which already has some data in the variables(taken from S3), and can give me the results based on the arguments I Pass.

Source: StackOverflow