|
|
@@ -10,11 +10,11 @@ Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. While W
|
|
|
|
|
|
Run the default Jetty server (`CMD ["jetty.sh", "run"]`):
|
|
|
|
|
|
- docker run -d jetty:9
|
|
|
+ docker run -d %%REPO%%:9
|
|
|
|
|
|
You can test it by visiting `http://container-ip:8080` in a browser or, if you need access outside the host, on port 8888:
|
|
|
|
|
|
- docker run -d -p 8888:8080 jetty:9
|
|
|
+ docker run -d -p 8888:8080 %%REPO%%:9
|
|
|
|
|
|
You can then go to `http://localhost:8888` or `http://host-ip:8888` in a browser.
|
|
|
|
|
|
@@ -28,13 +28,17 @@ The default Jetty environment in the image is:
|
|
|
JAVA_OPTIONS =
|
|
|
TMPDIR = /tmp/jetty
|
|
|
|
|
|
-Webapps can be [deployed](https://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications) in `/var/lib/jetty/webapps`.
|
|
|
+## Deployment
|
|
|
+
|
|
|
+Webapps can be [deployed](https://www.eclipse.org/jetty/documentation/current/quickstart-deploying-webapps.html) under `/var/lib/jetty/webapps` in the usual ways (WAR file, exploded WAR directory, or context XML file). To deploy your application to the `/` context, use the name `ROOT.war`, the directory name `ROOT`, or the context file `ROOT.xml` (case insensitive).
|
|
|
+
|
|
|
+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`.
|
|
|
|
|
|
## Read-only container
|
|
|
|
|
|
-To run `jetty` as a read-only container, have Docker create the `/tmp/jetty` and `/run/jetty` directories as volumes:
|
|
|
+To run `%%REPO%%` as a read-only container, have Docker create the `/tmp/jetty` and `/run/jetty` directories as volumes:
|
|
|
|
|
|
- docker run -d --read-only -v /tmp/jetty -v /run/jetty jetty:9
|
|
|
+ docker run -d --read-only -v /tmp/jetty -v /run/jetty %%REPO%%:9
|
|
|
|
|
|
Since the container is read-only, you'll need to either mount in your webapps directory with `-v /path/to/my/webapps:/var/lib/jetty/webapps` or by populating `/var/lib/jetty/webapps` in a derived image.
|
|
|
|
|
|
@@ -44,4 +48,4 @@ By default, this image starts as user `root` and uses Jetty's `setuid` module to
|
|
|
|
|
|
If you would like the image to start immediately as user `jetty` instead of starting as `root`, you can start the container with `-u jetty`:
|
|
|
|
|
|
- docker run -d -u jetty jetty:9
|
|
|
+ docker run -d -u jetty %%REPO%%:9
|