From 48884d3e855ad53b4a698f1d2c5aee79a3734a53 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 28 Aug 2015 15:40:12 +1000 Subject: [PATCH 1/5] Updated documentation for recent jetty image changes --- jetty/content.md | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/jetty/content.md b/jetty/content.md index 91778e32e..1d07617b3 100644 --- a/jetty/content.md +++ b/jetty/content.md @@ -8,7 +8,7 @@ Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. While W # How to use this image. -Run the default Jetty server (`CMD ["jetty.sh", "run"]`): +Run the default Jetty server (`CMD ["java","-Djava.io.tmpdir=/tmp/jetty","-jar","/usr/local/jetty/start.jar"]`): ```console $ docker run -d %%REPO%%:9 @@ -26,10 +26,10 @@ The default Jetty environment in the image is: JETTY_HOME = /usr/local/jetty JETTY_BASE = /var/lib/jetty - JETTY_CONF = /usr/local/jetty/etc/jetty.conf - JETTY_STATE = /run/jetty/jetty.state - JETTY_ARGS = - JAVA_OPTIONS = + JETTY_CONF = /usr/local/jetty/etc/jetty.conf # Deprecated + JETTY_STATE = /run/jetty/jetty.state # Deprecated + JETTY_ARGS = # Deprecated + JAVA_OPTIONS = # Deprecated TMPDIR = /tmp/jetty ## Deployment @@ -38,6 +38,24 @@ Webapps can be [deployed](https://www.eclipse.org/jetty/documentation/current/qu For older EOL'd images based on Jetty 7 or Jetty 8, please follow the [legacy instructions](https://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications) on the Eclipse Wiki and deploy under `/usr/local/jetty/webapps` instead of `/var/lib/jetty/webapps`. +## Configuration + +The configuration of the jetty server can be reported by running with the --list-config option: +```console +$ docker run -d %%REPO%%:9 --list-config +``` +Configuration such as parameters and additional modules may also be passed in via the command line. For example +```console +$ docker run -d %%REPO%%:9 --modules=jmx jetty.threadPool.maxThreads=500 +``` +To update the server configuration in a new docker image, the Dockerfile may enamble additional modules with RUN commands like: +``` +WORKDIR $JETTY_BASE +RUN java -jar "$JETTY_HOME/start.jar" --add-to-startd=jmx,http2 +``` +Modules may be configured in a Dockerfile by editing the properties in corresponding `/var/lib/jetty/start.d/*.mod` file or the module can be deactivated by +removing that file. + ## Read-only container To run `%%REPO%%` as a read-only container, have Docker create the `/tmp/jetty` and `/run/jetty` directories as volumes: From bbf3755ea56b0638c5086aa1f49393cc3048ef18 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Sat, 29 Aug 2015 18:14:35 +1000 Subject: [PATCH 2/5] Corrections from feedback from @md5 --- jetty/content.md | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/jetty/content.md b/jetty/content.md index 1d07617b3..93588674a 100644 --- a/jetty/content.md +++ b/jetty/content.md @@ -8,7 +8,7 @@ Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. While W # How to use this image. -Run the default Jetty server (`CMD ["java","-Djava.io.tmpdir=/tmp/jetty","-jar","/usr/local/jetty/start.jar"]`): +Run the default Jetty server: ```console $ docker run -d %%REPO%%:9 @@ -26,10 +26,6 @@ The default Jetty environment in the image is: JETTY_HOME = /usr/local/jetty JETTY_BASE = /var/lib/jetty - JETTY_CONF = /usr/local/jetty/etc/jetty.conf # Deprecated - JETTY_STATE = /run/jetty/jetty.state # Deprecated - JETTY_ARGS = # Deprecated - JAVA_OPTIONS = # Deprecated TMPDIR = /tmp/jetty ## Deployment @@ -40,21 +36,21 @@ For older EOL'd images based on Jetty 7 or Jetty 8, please follow the [legacy in ## Configuration -The configuration of the jetty server can be reported by running with the --list-config option: +The configuration of the Jetty server can be reported by running with the `--list-config` option: ```console $ docker run -d %%REPO%%:9 --list-config ``` -Configuration such as parameters and additional modules may also be passed in via the command line. For example +Configuration such as parameters and additional modules may also be passed in via the command line. For example: ```console $ docker run -d %%REPO%%:9 --modules=jmx jetty.threadPool.maxThreads=500 ``` -To update the server configuration in a new docker image, the Dockerfile may enamble additional modules with RUN commands like: +To update the server configuration in a derived Docker image, the `Dockerfile` may +enable additional modules with `RUN` commands like: ``` WORKDIR $JETTY_BASE -RUN java -jar "$JETTY_HOME/start.jar" --add-to-startd=jmx,http2 +RUN java -jar "$JETTY_HOME/start.jar" --add-to-startd=jmx,stats ``` -Modules may be configured in a Dockerfile by editing the properties in corresponding `/var/lib/jetty/start.d/*.mod` file or the module can be deactivated by -removing that file. +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. ## Read-only container From dc2529328c31bae8637eba4f087245217648d789 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Sat, 29 Aug 2015 17:03:06 -0700 Subject: [PATCH 3/5] Appease markdownfmt --- jetty/content.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jetty/content.md b/jetty/content.md index 93588674a..23a696291 100644 --- a/jetty/content.md +++ b/jetty/content.md @@ -37,19 +37,25 @@ For older EOL'd images based on Jetty 7 or Jetty 8, please follow the [legacy in ## Configuration The configuration of the Jetty server can be reported by running with the `--list-config` option: + ```console $ docker run -d %%REPO%%:9 --list-config ``` + Configuration such as parameters and additional modules may also be passed in via the command line. For example: + ```console $ docker run -d %%REPO%%:9 --modules=jmx jetty.threadPool.maxThreads=500 ``` + To update the server configuration in a derived Docker image, the `Dockerfile` may enable additional modules with `RUN` commands like: -``` + +```Dockerfile WORKDIR $JETTY_BASE 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. ## Read-only container From d74ff5c8de34d58d30fec4d136c31aab2d9f2db3 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Sat, 29 Aug 2015 17:03:52 -0700 Subject: [PATCH 4/5] Adjust example Dockerfile for adding new modules --- jetty/content.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jetty/content.md b/jetty/content.md index 23a696291..192f2137a 100644 --- a/jetty/content.md +++ b/jetty/content.md @@ -52,7 +52,8 @@ To update the server configuration in a derived Docker image, the `Dockerfile` m enable additional modules with `RUN` commands like: ```Dockerfile -WORKDIR $JETTY_BASE +FROM jetty:9 + RUN java -jar "$JETTY_HOME/start.jar" --add-to-startd=jmx,stats ``` From 9f422ae85d79e4b88a685c8683dca6e5847a4016 Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Sat, 29 Aug 2015 17:10:00 -0700 Subject: [PATCH 5/5] More markdownfmt appeasement --- jetty/content.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jetty/content.md b/jetty/content.md index 192f2137a..be918c624 100644 --- a/jetty/content.md +++ b/jetty/content.md @@ -48,8 +48,7 @@ Configuration such as parameters and additional modules may also be passed in vi $ docker run -d %%REPO%%:9 --modules=jmx jetty.threadPool.maxThreads=500 ``` -To update the server configuration in a derived Docker image, the `Dockerfile` may -enable additional modules with `RUN` commands like: +To update the server configuration in a derived Docker image, the `Dockerfile` may enable additional modules with `RUN` commands like: ```Dockerfile FROM jetty:9