瀏覽代碼

Merge pull request #709 from appropriate/jetty-java-options

Document passing JAVA_OPTIONS to jetty image
yosifkit 9 年之前
父節點
當前提交
e7755ac5b1
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      jetty/content.md

+ 8 - 0
jetty/content.md

@@ -60,6 +60,14 @@ RUN java -jar "$JETTY_HOME/start.jar" --add-to-startd=jmx,stats
 
 Modules may be configured in a `Dockerfile` by editing the properties in the corresponding `/var/lib/jetty/start.d/*.mod` file or the module can be deactivated by removing that file.
 
+### JVM Configuration
+
+JVM options can be set by passing the `JAVA_OPTIONS` environment variable to the container. For example, to set the maximum heap size to 1 gigabyte, you can run the container as follows:
+
+```console
+$ docker run -e JAVA_OPTIONS="-Xmx1g" -d %%REPO%%
+```
+
 ## Read-only container
 
 To run `%%REPO%%` as a read-only container, have Docker create the `/tmp/jetty` and `/run/jetty` directories as volumes: