ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log due low value of vm.max_map_count

Sonarqube Docker Image 8.7 community edition.

Trying to run Sonarqube as a container inside Azure WebApp. Getting Error which is helpful i.e. max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144] but not sure how to set it value inside a Azure Web App. Any thoughts on how to set the value of vm.max_map_count. Tried using Application setting but it is not working.

2021-03-15T15:00:26.432Z ERROR - multi-container unit was not started successfully
2021-03-15T15:00:26.450Z INFO  - Container logs from euwsonarqube__002f_sonarqube_0_a6809fd0 = 2021-03-15T14:59:16.643818674Z 2021.03.15 14:59:16 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021-03-15T14:59:16.744659285Z 2021.03.15 14:59:16 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:42589]
2021-03-15T14:59:17.073474616Z 2021.03.15 14:59:17 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021-03-15T14:59:17.177866256Z 2021.03.15 14:59:17 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2021-03-15T14:59:17.879795078Z warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
2021-03-15T14:59:17.916573452Z OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021-03-15T14:59:23.780770407Z 2021.03.15 14:59:23 INFO  es[][o.e.n.Node] version[7.10.2], pid[30], build[oss/tar/747e1cc71def077253878a59143c1f785afa92b9/2021-01-13T00:42:12.435326Z], OS[Linux/4.15.0-112-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.10/11.0.10+9]
2021-03-15T14:59:23.795756983Z 2021.03.15 14:59:23 INFO  es[][o.e.n.Node] JVM home [/opt/java/openjdk]
2021-03-15T14:59:23.800626600Z 2021.03.15 14:59:23 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=oss, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021-03-15T14:59:25.416490055Z 2021.03.15 14:59:25 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021-03-15T14:59:25.417344910Z 2021.03.15 14:59:25 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021-03-15T14:59:25.417359611Z 2021.03.15 14:59:25 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021-03-15T14:59:25.418152063Z 2021.03.15 14:59:25 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021-03-15T14:59:25.418765803Z 2021.03.15 14:59:25 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021-03-15T14:59:25.420804636Z 2021.03.15 14:59:25 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021-03-15T14:59:25.578291494Z 2021.03.15 14:59:25 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (none)]], net usable_space [13.4gb], net total_space [34.1gb], types [aufs]
2021-03-15T14:59:25.587151771Z 2021.03.15 14:59:25 INFO  es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2021-03-15T14:59:25.738598336Z 2021.03.15 14:59:25 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [egL5vU5LRqiUYiAQr5oSlw], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021-03-15T14:59:33.677881870Z 2021.03.15 14:59:33 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=503.6mb}]
2021-03-15T14:59:33.888174033Z 2021.03.15 14:59:33 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021-03-15T14:59:34.669233979Z 2021.03.15 14:59:34 WARN  es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021-03-15T14:59:35.240566998Z 2021.03.15 14:59:35 INFO  es[][o.e.n.Node] initialized
2021-03-15T14:59:35.241389652Z 2021.03.15 14:59:35 INFO  es[][o.e.n.Node] starting ...
2021-03-15T14:59:35.792806277Z 2021.03.15 14:59:35 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:42589}, bound_addresses {127.0.0.1:42589}
2021-03-15T14:59:36.393061476Z 2021.03.15 14:59:36 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021-03-15T14:59:36.409771962Z ERROR: [1] bootstrap checks failed
2021-03-15T14:59:36.410414903Z [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2021-03-15T14:59:36.413786322Z ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
2021-03-15T14:59:36.428668589Z 2021.03.15 14:59:36 INFO  es[][o.e.n.Node] stopping ...
2021-03-15T14:59:36.487582617Z 2021.03.15 14:59:36 INFO  es[][o.e.n.Node] stopped
2021-03-15T14:59:36.488328365Z 2021.03.15 14:59:36 INFO  es[][o.e.n.Node] closing ...
2021-03-15T14:59:36.542143862Z 2021.03.15 14:59:36 INFO  es[][o.e.n.Node] closed
2021-03-15T14:59:36.810601004Z 2021.03.15 14:59:36 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2021-03-15T14:59:36.812084300Z 2021.03.15 14:59:36 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021-03-15T14:59:36.813854115Z 2021.03.15 14:59:36 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2021-03-15T14:59:41.305066289Z 2021.03.15 14:59:41 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021-03-15T14:59:41.380601513Z 2021.03.15 14:59:41 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:38183]
2021-03-15T14:59:41.557080515Z 2021.03.15 14:59:41 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021-03-15T14:59:41.669397335Z 2021.03.15 14:59:41 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2021-03-15T14:59:42.450916273Z warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
2021-03-15T14:59:42.500589110Z OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021-03-15T14:59:48.576523000Z 2021.03.15 14:59:48 INFO  es[][o.e.n.Node] version[7.10.2], pid[30], build[oss/tar/747e1cc71def077253878a59143c1f785afa92b9/2021-01-13T00:42:12.435326Z], OS[Linux/4.15.0-112-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.10/11.0.10+9]
2021-03-15T14:59:48.588554782Z 2021.03.15 14:59:48 INFO  es[][o.e.n.Node] JVM home [/opt/java/openjdk]
2021-03-15T14:59:48.596648809Z 2021.03.15 14:59:48 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=oss, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021-03-15T14:59:50.120205817Z 2021.03.15 14:59:50 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021-03-15T14:59:50.123847754Z 2021.03.15 14:59:50 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021-03-15T14:59:50.136180056Z 2021.03.15 14:59:50 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021-03-15T14:59:50.136882702Z 2021.03.15 14:59:50 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021-03-15T14:59:50.138390200Z 2021.03.15 14:59:50 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021-03-15T14:59:50.138405301Z 2021.03.15 14:59:50 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021-03-15T14:59:50.318809337Z 2021.03.15 14:59:50 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (none)]], net usable_space [13.4gb], net total_space [34.1gb], types [aufs]
2021-03-15T14:59:50.323991474Z 2021.03.15 14:59:50 INFO  es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2021-03-15T14:59:50.664705337Z 2021.03.15 14:59:50 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [egL5vU5LRqiUYiAQr5oSlw], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021-03-15T14:59:58.312411568Z 2021.03.15 14:59:58 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=503.6mb}]
2021-03-15T14:59:58.439872646Z 2021.03.15 14:59:58 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021-03-15T14:59:59.144556510Z 2021.03.15 14:59:59 WARN  es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021-03-15T14:59:59.579968587Z 2021.03.15 14:59:59 INFO  es[][o.e.n.Node] initialized
2021-03-15T14:59:59.588166520Z 2021.03.15 14:59:59 INFO  es[][o.e.n.Node] starting ...
2021-03-15T14:59:59.880574910Z 2021.03.15 14:59:59 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:38183}, bound_addresses {127.0.0.1:38183}
2021-03-15T15:00:00.601007997Z 2021.03.15 15:00:00 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021-03-15T15:00:00.618312321Z ERROR: [1] bootstrap checks failed
2021-03-15T15:00:00.619077070Z [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2021-03-15T15:00:00.619090271Z ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
2021-03-15T15:00:00.649868570Z 2021.03.15 15:00:00 INFO  es[][o.e.n.Node] stopping ...
2021-03-15T15:00:00.708162556Z 2021.03.15 15:00:00 INFO  es[][o.e.n.Node] stopped
2021-03-15T15:00:00.735830053Z 2021.03.15 15:00:00 INFO  es[][o.e.n.Node] closing ...
2021-03-15T15:00:00.830193981Z 2021.03.15 15:00:00 INFO  es[][o.e.n.Node] closed
2021-03-15T15:00:01.014825972Z 2021.03.15 15:00:01 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2021-03-15T15:00:01.016337870Z 2021.03.15 15:00:01 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021-03-15T15:00:01.018346100Z 2021.03.15 15:00:01 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2021-03-15T15:00:04.578450456Z 2021.03.15 15:00:04 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021-03-15T15:00:04.653906576Z 2021.03.15 15:00:04 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:44549]
2021-03-15T15:00:04.807785509Z 2021.03.15 15:00:04 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021-03-15T15:00:04.925413078Z 2021.03.15 15:00:04 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2021-03-15T15:00:05.718891914Z warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
2021-03-15T15:00:05.758842919Z OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021-03-15T15:00:12.433675940Z 2021.03.15 15:00:12 INFO  es[][o.e.n.Node] version[7.10.2], pid[30], build[oss/tar/747e1cc71def077253878a59143c1f785afa92b9/2021-01-13T00:42:12.435326Z], OS[Linux/4.15.0-112-generic/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.10/11.0.10+9]
2021-03-15T15:00:12.444528146Z 2021.03.15 15:00:12 INFO  es[][o.e.n.Node] JVM home [/opt/java/openjdk]
2021-03-15T15:00:12.451719613Z 2021.03.15 15:00:12 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=oss, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021-03-15T15:00:13.890789348Z 2021.03.15 15:00:13 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021-03-15T15:00:13.892999192Z 2021.03.15 15:00:13 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021-03-15T15:00:13.894197570Z 2021.03.15 15:00:13 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021-03-15T15:00:13.894212371Z 2021.03.15 15:00:13 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021-03-15T15:00:13.895011523Z 2021.03.15 15:00:13 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021-03-15T15:00:13.898110624Z 2021.03.15 15:00:13 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021-03-15T15:00:14.040545482Z 2021.03.15 15:00:14 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (none)]], net usable_space [13.4gb], net total_space [34.1gb], types [aufs]
2021-03-15T15:00:14.049615371Z 2021.03.15 15:00:14 INFO  es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2021-03-15T15:00:14.479547916Z 2021.03.15 15:00:14 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [egL5vU5LRqiUYiAQr5oSlw], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021-03-15T15:00:22.170764640Z 2021.03.15 15:00:22 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=503.6mb}]
2021-03-15T15:00:22.359754648Z 2021.03.15 15:00:22 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021-03-15T15:00:23.093180511Z 2021.03.15 15:00:23 WARN  es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021-03-15T15:00:23.788011960Z 2021.03.15 15:00:23 INFO  es[][o.e.n.Node] initialized
2021-03-15T15:00:23.788892118Z 2021.03.15 15:00:23 INFO  es[][o.e.n.Node] starting ...
2021-03-15T15:00:24.257436231Z 2021.03.15 15:00:24 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:44549}, bound_addresses {127.0.0.1:44549}
2021-03-15T15:00:24.919327536Z 2021.03.15 15:00:24 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021-03-15T15:00:24.932029363Z ERROR: [1] bootstrap checks failed
2021-03-15T15:00:24.932926921Z [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2021-03-15T15:00:24.935814709Z ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
2021-03-15T15:00:24.952626704Z 2021.03.15 15:00:24 INFO  es[][o.e.n.Node] stopping ...
2021-03-15T15:00:25.026659525Z 2021.03.15 15:00:25 INFO  es[][o.e.n.Node] stopped
2021-03-15T15:00:25.027443976Z 2021.03.15 15:00:25 INFO  es[][o.e.n.Node] closing ...
2021-03-15T15:00:25.109820941Z 2021.03.15 15:00:25 INFO  es[][o.e.n.Node] closed
2021-03-15T15:00:25.273915928Z 2021.03.15 15:00:25 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2021-03-15T15:00:25.275555434Z 2021.03.15 15:00:25 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021-03-15T15:00:25.277407855Z 2021.03.15 15:00:25 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

2021-03-15T15:00:26.655Z INFO  - Stopping site euwsonarqube__002f because it failed during startup.