For setting the Java memory parameters (i.e. -Xms, -Xmx) inside the container, when Tomcat starts, you usually need to use the JAVA_OPTS environment variable (or more recently, the MEMORY_SETTING* environment variables, with the mention they are not yet available in the public gitlab image).
“Runtime options for containers created using docker run are available at:
Runtime options with Memory, CPUs, and GPUs | Docker Documentation
Similar options are supported in compose file v2, but have been removed in compose file v3 where they have been replaced with options inside a new deploy / resources section; these new options are only available to docker swarm and are ignored when using docker compose .
For allocating more memory (i.e. RAM) to the containers themselves, you need to use docker-related instruction.
Runtime options for containers created using docker run are available at:
Runtime options with Memory, CPUs, and GPUs | Docker Documentation
Similar options are supported in compose file v2, but have been removed in compose file v3 where they have been replaced with options inside a new deploy / resources section; these new options are only available to docker swarm and are ignored when using docker compose .