Increase java memory size in Docker container

Im unable to find a way to increase java memory size when running a Docker container. I have found posts for editing the katalon.ini and via Execution Settings (for KSE) but not found anything related to Docker usage.

A bit of background, im using a small Amazon EC2 instance which has 4gb of RAM, 2gb is used by Docker with 1gb not used which would ideally be allocated to java.

Has anyone been able to increase java memory in a container and able to share any tips/advice?

Thanks.

Another one for @bionel?

By unpacking the tar.gz from https://github.com/katalon-studio/katalon-studio/releases/download/v8.4.1/Katalon_Studio_Engine_Linux_64-8.4.1.tar.gz

I can see there is a katalonc.ini file present which is similar with katalon.ini for KSE.
Tuning this file should do the trick. This should be present also in the docker image.

[bionel@localhost Katalon_Studio_Engine_Linux_64-8.4.1]$ ls
artifacts.xml  configuration  features  icon.xpm  katalonc  katalonc.ini  p2  plugins
[bionel@localhost Katalon_Studio_Engine_Linux_64-8.4.1]$ cat katalonc.ini 
-startup
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1200.v20200508-1552
-noSplash
-data
@noDefault
-vmargs
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Dfile.encoding=utf-8
-Xmx2048m

inside the docker image/container, this file is under /opt/katalonstudio folder:

root@3171f15fbfd3:/# ls /opt/
google  gradle  katalonstudio  microsoft
root@3171f15fbfd3:/# ls /opt/katalonstudio/
artifacts.xml  configuration  features  icon.xpm  katalonc  katalonc.ini  p2  plugins
root@3171f15fbfd3:/# cat /opt/katalonstudio/katalonc.ini 
-startup
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1200.v20200508-1552
-noSplash
-data
@noDefault
-vmargs
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Dfile.encoding=utf-8
-Xmx2048m

so you can either:

  • start a container in background (detached) mode
  • tweak the file (use docker exec with some clever sed or simply edit manually by jumping into the running container)
  • run the tests with docker exec

or build your own custom docker image
if you want to build it from scratch, everything needed is at:

but you can choose whatever approach you like, use your own docker file sourcing from the current docker image and tweak the file, or start a container, do your changes and commit the container in a new image

Thanks @bionel this looks great, i was looking for an equivalent katalon.ini and katalonc.ini looks to be it.

ill carry out some experiments and see what works, Dockerfile looks the way forward but seeing how it works through the command line may be my first approach.

Will update with findings.